Exemple #1
0
def main():
    argument_parser = ArgumentParser()
    final_x_position, final_y_position, coins = pacman(
        argument_parser.args.filepath)
    print(f"{final_x_position=}, {final_y_position=}, {coins=}")
Exemple #2
0
 def test_into_wall_at_center(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "into_wall_at_center.txt")),
         (0, 0, 10),
     )
Exemple #3
0
 def test_into_start(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "into_start.txt")), (0, 0, 1),
     )
Exemple #4
0
 def test_from_instructions(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "from_instructions.txt")),
         (1, 4, 7),
     )
Exemple #5
0
 def test_into_edges(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "into_edges.txt")), (0, 0, 15),
     )
Exemple #6
0
 def test_board_of_size_zero(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "board_of_size_zero.txt")),
         (-1, -1, 0),
     )
Exemple #7
0
 def test_wall_input_zero(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "wall_input_zero.txt")),
         (7, 1, 35),
     )
Exemple #8
0
 def test_wall_outside_board(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "wall_outside_board.txt")),
         (-1, -1, 0),
     )
Exemple #9
0
 def test_pacman_start_on_wall(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "pacman_start_on_wall.txt")),
         (-1, -1, 0),
     )
Exemple #10
0
 def test_empty(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "empty.txt")), (-1, -1, 0)
     )
Exemple #11
0
 def test_runtime(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "runtime.txt")), (2142, 147, 148)
     )
Exemple #12
0
 def test_generic(self):
     self.assertEqual(
         pacman(os.path.join("tests", "resources", "generic.txt")), (6, 1, 27)
     )