# Copyright © 2022 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 . AT_SETUP([board bitmap functions]) AT_CHECK([boardbit], [0], [[left(0) left(1) left(2) left(3) left(4) @.... @@... @@@.. @@@@. @@@@@ @.... @@... @@@.. @@@@. @@@@@ @.... @@... @@@.. @@@@. @@@@@ @.... @@... @@@.. @@@@. @@@@@ @.... @@... @@@.. @@@@. @@@@@ right(0) right(1) right(2) right(3) right(4) @@@@@ .@@@@ ..@@@ ...@@ ....@ @@@@@ .@@@@ ..@@@ ...@@ ....@ @@@@@ .@@@@ ..@@@ ...@@ ....@ @@@@@ .@@@@ ..@@@ ...@@ ....@ @@@@@ .@@@@ ..@@@ ...@@ ....@ above(0) above(1) above(2) above(3) above(4) @@@@@ @@@@@ @@@@@ @@@@@ @@@@@ ..... @@@@@ @@@@@ @@@@@ @@@@@ ..... ..... @@@@@ @@@@@ @@@@@ ..... ..... ..... @@@@@ @@@@@ ..... ..... ..... ..... @@@@@ below(0) below(1) below(2) below(3) below(4) @@@@@ ..... ..... ..... ..... @@@@@ @@@@@ ..... ..... ..... @@@@@ @@@@@ @@@@@ ..... ..... @@@@@ @@@@@ @@@@@ @@@@@ ..... @@@@@ @@@@@ @@@@@ @@@@@ @@@@@ ]]) AT_CLEANUP AT_SETUP([game_do_move zigzag]) AT_CHECK([boardmove m4_do( [0010203040], [4131211101], [0212223242], [4333231303], [0414243444])], [0], [[.@@@@ @@@@@ @@@@@ @@@@@ @@@@@ @.@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@.@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@.@ @@@@@ @@@@@ @@@@@ @@@@@ @@@@. @@@@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 @@.@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@.@ @@@@@ @@@@@ @@@@@ @@@@@ @.@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@@. @@@@@ @@@@@ @@@@@ @@@@@ .@@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@.@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@.@@ @@@@@ @@@@@ @@@@@ @@@@@ @.@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@.@ @@@@@ @@@@@ @@@@@ @@@@@ .@@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@@. @@@@@ @@@@@ @@@@@ @@@@@ @@.@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@.@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@.@ @@@@@ @@@@@ @@@@@ @@@@@ @.@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@@@. @@@@@ @@@@@ @@@@@ @@@@@ .@@@@ @@@@@ @@@@@ @@@@@ @@@@@ @@.@@ ]]) AT_CLEANUP AT_SETUP([xoshiro256** sanity]) AT_CHECK([rng-test >out grep -v '^ok' out], [0], [1..200 ]) AT_CLEANUP