def test_move_piece_off_bottom(self): ''' test move piece off bottom ''' piece = game_piece(20, 1, 'name') location = (3, 4) gameboard = create_gameboard() check = check_move(piece, location, gameboard) self.assertEqual(check, True)
def test_ht_off_right(self): ''' test move piece off top ''' piece = game_piece(6, 2, 'heavy tackle') location = (4, 14) gameboard = create_gameboard() check = check_move(piece, location, gameboard) self.assertEqual(check, False)
def test_move_piece_off_top(self): ''' test move piece off top ''' piece = game_piece(20, 1, 'name') location = (-1, 4) gameboard = create_gameboard() check = check_move(piece, location, gameboard) self.assertEqual(check, False)
def test_other_off_column(self): ''' test moving non heavy tackle ''' piece = game_piece(20, 1, 'name') location = (1, 4) gameboard = create_gameboard() check = check_move(piece, location, gameboard) self.assertEqual(check, True)
def test_piece_on_another_piece(self): ''' test moving piece on another ''' piece = game_piece(20, 1, 'name') location = (1, 4) gameboard = create_gameboard() gameboard[location[0]][location[1]] = '1' check = check_move(piece, location, gameboard) self.assertEqual(check, False)
def test_heavy_tackle_offcolumn(self): ''' test moving heavy tackle ''' piece = game_piece(20, 2, 'heavy tackle') location = (1, 4) gameboard = create_gameboard() gameboard[location[0]][location[1]] = 'E' check = check_move(piece, location, gameboard) self.assertEqual(check, True)
def test_legal_move_ht(self): ''' test move legality ''' piece = game_piece(20, 2, 'heavy tackle') location = (1, 4) gameboard = create_gameboard() gameboard[location[0]][location[1]] = 'E' check = check_move(piece, location, gameboard) self.assertEqual(check, True)