Skip to content

Commit

Permalink
add create_dir_if_not_exists
Browse files Browse the repository at this point in the history
  • Loading branch information
xXUnique31Xx committed Jul 1, 2024
1 parent 45ecf7f commit ffe2c5d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,11 @@ def load_gamestate(self):
return False

self.view.last_board = self.board.get_copy_board_state()
return True
return True

@staticmethod
def create_directory_if_not_exists():
"""
Create the directory for saved games if it does not exist.
"""
Path("savedGames").mkdir(parents=True, exist_ok=True)

0 comments on commit ffe2c5d

Please sign in to comment.