Beispiel #1
0
 def test_move_one_step(self):
     """ This map can be done in one step.
     #####  01110
     ##@##  01@10
     #####  01110
     """
     mine_map = Map(5, 5, mine_pos_list=[(2, 2)])
     game = Game(mine_map)
     state = game._sweep((0, 0))
     self.assertEqual(state, 2)
Beispiel #2
0
 def test_one_step_success(self):
     click_list = [(0, 0), (0, 4), (4, 0), (4, 4)]
     for click_pos in click_list:
         game = Game(self.mine_map)
         state = game._sweep(click_pos)
         self.assertEqual(state, 2)