X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/2529a9651d160ab3a17118d778f5e5584d040765..583fc520dddf5125bc676777a537f0632f2acb55:/t/boardmove.c diff --git a/t/boardmove.c b/t/boardmove.c index 89b3460..9bc1171 100644 --- a/t/boardmove.c +++ b/t/boardmove.c @@ -1,8 +1,26 @@ +/* + * Helper to test game_do_move function. + * Copyright © 2022-2023 Nick Bowler + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include #include -#include "game.h" +#include "game-notime.h" static const char *progname; @@ -46,7 +64,7 @@ int main(int argc, char **argv) const char *seq; int i = 0; - if (argv > 0) + if (argc > 0) progname = argv[0]; if (argc != 2) { @@ -58,7 +76,7 @@ int main(int argc, char **argv) board.x = get_seq(seq[i++]); board.y = get_seq(seq[i++]); - board.game[0] = 0x1ffffff ^ board_position(board.x, board.y); + board.game[0] = GAME_MASK ^ board_position(board.x, board.y); board.game[1] = board.game[2] = board.game[3] = board.game[0]; while (1) {