2 * Helper to test game_overlay_goal function.
3 * Copyright © 2023 Nick Bowler
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
28 static const char *progname = "overlaygoal";
30 int main(int argc, char **argv)
38 while ((rc = scanf(X3("%" SCNxLEAST32) X3("%" SCNxLEAST16),
39 &board.game[0], &board.game[1],
40 &board.game[2], &board.goal[0],
41 &board.goal[1], &board.goal[2])) == 6)
43 uint_least32_t buf[3];
45 game_overlay_goal(&board, buf);
46 printf(X3(" %.7" PRIxLEAST32)"\n"+1, buf[0], buf[1], buf[2]);
51 fprintf(stderr, "%s: read error: %s\n", progname,
59 fprintf(stderr, "%s: invalid input sequence\n", progname);