Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void _SetStone(BOARD* pBoard, int x, int y) {
- int x0,y0, yMax;
- x0 = pBoard->checkedX;
- y0 = pBoard->checkedY;
- yMax = (pBoard->ActPlayer == 1) ? (NUM_CELL_Y - 1) : 0;
- _InvalidateCell(x0, y0);
- if (_IsCorrectXY(x, y)) {
- if(pBoard->NextStep == 0 && (y == yMax)){
- pBoard->aCells[x][y] = (pBoard->ActPlayer + 2);
- }else{
- pBoard->aCells[x][y] = (pBoard->TypeStone == 1) ? pBoard->ActPlayer : pBoard->ActPlayer + 2 ;
- }
- pBoard->aCells[x0][y0] = 0;
- pBoard->checkedX = NUM_CELL_X;
- pBoard->checkedY = NUM_CELL_Y;
- _InvalidateCell(x, y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement