You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include "Man.h"
|
|
|
|
|
void Man::init(Chess* chess)
|
|
|
|
|
{
|
|
|
|
|
this->chess = chess;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Man::go()
|
|
|
|
|
{
|
|
|
|
|
MOUSEMSG msg;
|
|
|
|
|
ChessPos pos;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
msg = GetMouseMsg();
|
|
|
|
|
//ͨ<><CDA8>chess<73><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>ӹ<EFBFBD><D3B9><EFBFBD>
|
|
|
|
|
if (msg.uMsg == WM_LBUTTONDOWN && chess->clickBoard(msg.x, msg.y, &pos)) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
chess->chessDown(&pos, CHESS_BLACK);
|
|
|
|
|
}
|