def test_3x3_board_str(self): game = Game(n_rows=3, n_cols=3) game.add_cross(0) game.add_cross(8) game.add_circle(4) board_str = game.board_str expected = 'X O X' self.assertEqual(board_str, expected)
def test_3x3_add_circle(self): game = Game(n_rows=3, n_cols=3) game.add_circle(0) self.assertEqual(game.board_o, 0b000000001) game.add_circle(8) self.assertEqual(game.board_o, 0b100000001) game.add_circle(4) self.assertEqual(game.board_o, 0b100010001)