ADD file via upload

main
pwhjurltz 11 months ago
parent 5273b3ceb5
commit 359d8f3763

@ -0,0 +1,23 @@
#include "Man.h"
void Man::init(Chess* chess)
{
this->chess = chess;
}
void Man::go()
{
MOUSEMSG msg;
ChessPos pos;
while (1) {
//获取鼠标点击消息
msg = GetMouseMsg();
//通过chess对象来调用判断落子是否有效以及落子功能
if (msg.uMsg == WM_LBUTTONDOWN && chess->clickBoard(msg.x, msg.y, &pos)) {
break;
}
}
//落子
chess->chessDown(&pos, CHESS_BLACK);
}
Loading…
Cancel
Save