From 5269e667916937629c4df637398dcbd679372765 Mon Sep 17 00:00:00 2001 From: Ben Ryder Date: Sun, 1 Mar 2020 11:41:33 +0000 Subject: [PATCH 1/3] GH-8 GH-3: Added check to new game make to create saved folder if it doesn't exist. --- data/saved/.gitignore | 2 -- project/game/new.py | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 data/saved/.gitignore diff --git a/data/saved/.gitignore b/data/saved/.gitignore deleted file mode 100644 index c96a04f..0000000 --- a/data/saved/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/project/game/new.py b/project/game/new.py index 0852a62..8a5b6a2 100644 --- a/project/game/new.py +++ b/project/game/new.py @@ -1,5 +1,7 @@ # Ben-Ryder 2019 +import os + import project.game.model as model import project.data as data import paths @@ -8,4 +10,9 @@ def make(game_name, map_name, players): """ where players = [[name, colour], [name,colour]...]""" game = model.Model(game_name, map_name, players) # creates "blank" game + + # Creating 'saved' directory if it doesn't exist. + if not os.path.exists(paths.gamePath): + os.mkdir(paths.gamePath) + data.save(game, paths.gamePath + game_name) From 0bcdaa09910f60512edc5558d5d3d51abe1dbfc0 Mon Sep 17 00:00:00 2001 From: Ben Ryder Date: Sun, 1 Mar 2020 11:59:46 +0000 Subject: [PATCH 2/3] GH-8: Added saved directory to project gitignore. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index b4eeb9d..b31c693 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Custom Ignores +data/saved + # Pycharm IDE .idea From 693291d81fe487d40ad36a37e134b3376148d90a Mon Sep 17 00:00:00 2001 From: Ben Ryder Date: Sun, 1 Mar 2020 12:01:38 +0000 Subject: [PATCH 3/3] Added v1.0.1 release info. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 91c1ebd..5a1f2a5 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Conqueror of Empires is a turn-based strategy game where up to 4 local players b The game was inspired by [Polytopia](http://midjiwan.com/polytopia.html) and [Civilisation](https://civilization.com/) and made using python and pygame. To download executables see [releases](https://github.com/Ben-Ryder/Conqueror-of-Empires/releases). +*** +**v1.0.1**: Release version 1.0.1 brings a proper fix for game crashes where the `saved` directory doesn't exist. +*** + ## Playing the Game #### From Source: Run the `main.py` file from the repository root.