| 74 simulation.moves[0] = last_move(gamestate); |
74 simulation.moves[0] = last_move(gamestate); |
| 75 simulation.movecount++; |
75 simulation.movecount++; |
| 76 } |
76 } |
| 77 |
77 |
| 78 return simulation; |
78 return simulation; |
| |
79 } |
| |
80 |
| |
81 uint8_t current_color(GameState *gamestate) { |
| |
82 return (gamestate->movecount % 2 == 0) ? WHITE : BLACK; |
| 79 } |
83 } |
| 80 |
84 |
| 81 /* MUST be called BETWEEN validating AND applying a move to work correctly */ |
85 /* MUST be called BETWEEN validating AND applying a move to work correctly */ |
| 82 static void format_move(GameState *gamestate, Move *move) { |
86 static void format_move(GameState *gamestate, Move *move) { |
| 83 char *string = &(move->string[0]); |
87 char *string = &(move->string[0]); |