Пример #1
0
def render(unused_argv: List[str], stdout: IO[str],
           unused_stderr: IO[str]) -> None:
    """Render an empty board."""
    game = Game(4)
    board = render_board(game)
    stdout.write("%s" % board)
Пример #2
0
 def test_bottom(self, data):
     game = _fill_squares(30, 45)
     expected = data["bottom"]
     actual = render_board(game)
     assert expected == actual
Пример #3
0
 def test_left(self, data):
     game = _fill_squares(46, 59)
     expected = data["left"]
     actual = render_board(game)
     assert expected == actual
Пример #4
0
 def test_right(self, data):
     game = _fill_squares(16, 29)
     expected = data["right"]
     actual = render_board(game)
     assert expected == actual
Пример #5
0
 def test_top(self, data):
     game = _fill_squares(0, 15)
     expected = data["top"]
     actual = render_board(game)
     assert expected == actual
Пример #6
0
 def test_safe_14(self, data):
     game = _fill_safe(1)
     expected = data["safe_14"]
     actual = render_board(game)
     assert expected == actual
Пример #7
0
 def test_home(self, data):
     game = _fill_home()
     expected = data["home"]
     actual = render_board(game)
     assert expected == actual
Пример #8
0
 def test_empty_4_player_empty(self, data):
     game = Game(playercount=4)
     expected = data["empty4"]
     actual = render_board(game)
     assert expected == actual