参考:https://github.com/silence1772/GreedySnake
个人github:https://github.com/okJiang/GreedySnake
2020.6.15 第一次更新及踩坑
更新:
Point
的getx()
、gety()
、Print()
tools
的设置窗口大小SetWindowsSize()
,设置光标位置SetCursorPosition()
踩坑:
-
创建
tools.cpp
的时候没有勾选Debug、Releaseerror:ld returned 1 exit status
可以通过右键tools.cpp
,点击properties,点build,再勾选
总结:
-
知道了COODR,表示一个字符在控制台屏幕上的坐标
-
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), position);
SetConsoleCursorPosition
:设置控制台光标位置GetStdHandle
:获取指定的标准设备的句柄,return HANDLE(句柄)
-