Skip to content
Snippets Groups Projects
Commit 6ae5e3a5 authored by Wiem0207's avatar Wiem0207
Browse files

modif 3

parent f948a5f9
No related branches found
No related tags found
No related merge requests found
......@@ -32,9 +32,11 @@ bool movePiece(Piece* board[board_size][board_size],Piece* piece, int newX, int
if ((moveDistance == piece->power)&&(canmove(newX, newY, currentplayer))){
piece->x=90+newX*CELL_SIZE;
piece->y=90+newY*CELL_SIZE;
board[newX][newY]=piece ;
board[oldX][oldY]->texture = NULL;
board[oldX][oldY]->power = -1;
Piece* temp=piece;
board[oldX][oldY]=board[newX][newY];
board[newX][newY]=piece ;
board[oldX][oldY]->x=90+oldX*CELL_SIZE;
board[oldX][oldY]->y=90+oldY*CELL_SIZE;
return true;
}
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment