Rev 172 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 172 | Rev 177 | ||
|---|---|---|---|
| Line 377... | Line 377... | ||
| 377 | // evaluate check and stalemate status |
377 | // evaluate check and stalemate status |
| 378 | new_move.is_check = Move_IsCheck (&new_move, 1 - new_move.color); // save whether opponent is in check or not |
378 | new_move.is_check = Move_IsCheck (&new_move, 1 - new_move.color); // save whether opponent is in check or not |
| 379 | new_move.is_stalemate = Move_IsStaleMate (&new_move, 1 - new_move.color); // save whether opponent is stalemate |
379 | new_move.is_stalemate = Move_IsStaleMate (&new_move, 1 - new_move.color); // save whether opponent is stalemate |
| 380 | 380 | ||
| 381 | // describe our move in Standard Abbreviated Notation and describe the resulting table in Forsyth-Edwards Notation |
381 | // describe our move in Standard Abbreviated Notation and describe the resulting table in Forsyth-Edwards Notation |
| 382 | Move_DescribeInSAN (& |
382 | Move_DescribeInSAN (&new_move, last_move); |
| 383 | Move_DescribeInFEN (&new_move); |
383 | Move_DescribeInFEN (&new_move); |
| 384 | 384 | ||
| 385 | // resize the previous moves array and insert our new move at the end of it |
385 | // resize the previous moves array and insert our new move at the end of it |
| 386 | board->moves = (boardmove_t *) SAFE_realloc (board->moves, board->move_count, board->move_count + 1, sizeof (boardmove_t), false); |
386 | board->moves = (boardmove_t *) SAFE_realloc (board->moves, board->move_count, board->move_count + 1, sizeof (boardmove_t), false); |
| 387 | memcpy (&board->moves[board->move_count], &new_move, sizeof (boardmove_t)); |
387 | memcpy (&board->moves[board->move_count], &new_move, sizeof (boardmove_t)); |