コード例 #1
0
 def test_move_legal_move(self):
     creature = Creature([0, 0], INIT_HUNGER, 1)
     test_world = World(4, 0)
     submited_output = creature.move("Right", test_world)
     expected_output = [0, 1]
     self.assertEqual(submited_output, expected_output)
コード例 #2
0
 def test_move_legal_move(self):
     creature = Creature([0, 0], INIT_HUNGER, 1)
     test_world = World(4, 0)
     submited_output = creature.move("Right", test_world)
     expected_output = [0, 1]
     self.assertEqual(submited_output, expected_output)
コード例 #3
0
 def test_move_illegal_move_off_world(self):
     creature = Creature([0, 0], INIT_HUNGER, 1)
     test_world = World(4, 0)
     submited_output = creature.move("Left", test_world)
     expected_output = False
     self.assertEqual(submited_output, expected_output)
コード例 #4
0
 def test_move_illegal_move_off_world(self):
     creature = Creature([0, 0], INIT_HUNGER, 1)
     test_world = World(4, 0)
     submited_output = creature.move("Left", test_world)
     expected_output = False
     self.assertEqual(submited_output, expected_output)