Ejemplo n.º 1
0
 def test_odd_dr(self):
     ''' test dr move for piece in odd row '''
     piece = game_piece(20, 1, 'name')
     piece.place_on_board(3, 2)
     new_move = calculate_move(piece, 'dr')
     self.assertEqual(new_move['row'], 4)
     self.assertEqual(new_move['col'], 2)
Ejemplo n.º 2
0
 def test_even_dl(self):
     ''' test dl move for piece in even row '''
     piece = game_piece(20, 1, 'name')
     piece.place_on_board(2, 2)
     new_move = calculate_move(piece, 'dl')
     self.assertEqual(new_move['row'], 3)
     self.assertEqual(new_move['col'], 2)