diff options
author | Raúl Benencia <rul@kalgan.cc> | 2015-03-31 15:54:15 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2015-03-31 15:54:15 -0300 |
commit | 73857333f872ec5a1d32dbd522d8a7d6f2625fac (patch) | |
tree | 8abd25c9b8ecbfd88304637c050c2dd84d76a0bd /lib/game.c | |
parent | be51176891684e40c9949d89622497d8235cfb5c (diff) |
define game_is_checkmate(Board, Color)
Diffstat (limited to 'lib/game.c')
-rw-r--r-- | lib/game.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -13,12 +13,19 @@ static Color _toggle_current_player(Color c) { return WHITE; } +/* + * TODO + */ +int game_is_checkmate(Board board, Color color) { + return 0; +} + Board game_loop(Board board) { Board b = board; Color current_player = WHITE; Coord orig, dest; - while (1) { + while (!game_is_checkmate(b, current_player)) { print_board(b, current_player); putchar('\n'); @@ -33,4 +40,6 @@ Board game_loop(Board board) { b = board_make_move(b, move_init(orig, dest)); current_player = _toggle_current_player(current_player); } + + return 0; } |