X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test;h=bcf3e3f86a0c526e022368adc54a9e81e98ababb;hb=82b93d9e3014d98933c3fa1b0d4bec9cf884ebe4;hp=8659c64b7d63207eef9defb6d2f19d957237194b;hpb=31ac24b21c0741e13bfbaf433f2b98ea3db8ca48;p=empires-server diff --git a/test b/test index 8659c64..bcf3e3f 100755 --- a/test +++ b/test @@ -577,6 +577,45 @@ result=$(scribe_move '[0,8]') test "$result" = '{"legal":true}' TEST_END +TEST "Several moves to fill up the mini-grid 0" +scribe_set_player_team o +scribe_move '[3,0]' >/dev/null +scribe_set_player_team + +scribe_move '[8,0]' >/dev/null +scribe_set_player_team o +scribe_move '[0,0]' >/dev/null +scribe_set_player_team + +scribe_move '[0,1]' >/dev/null +scribe_set_player_team o +scribe_move '[0,2]' >/dev/null +scribe_set_player_team + +scribe_move '[1,0]' >/dev/null +scribe_set_player_team o +scribe_move '[2,0]' >/dev/null +scribe_set_player_team + +scribe_move '[0,5]' >/dev/null +scribe_set_player_team o +scribe_move '[0,6]' >/dev/null +scribe_set_player_team + +scribe_move '[5,0]' >/dev/null +scribe_set_player_team o +scribe_move '[6,0]' >/dev/null +scribe_set_player_team + +scribe_move '[0,7]' >/dev/null +scribe_set_player_team o +scribe_move '[0,4]' >/dev/null +scribe_set_player_team + +result=$(scribe_move '[7,0]') +test "$result" = '{"legal":true}' +TEST_END + +TEST "Full mini grid allows a free move" +scribe_set_player_team o +scribe_move '[4,1]' >/dev/null +scribe_set_player_team + +result=$(scribe_move '[1,1]') +test "$result" = '{"legal":true}' +TEST_END TEST_SECTION "Empathy game"