From 25861cc8146b14c73d1e2abc95bf0c9f0b8cc2db Mon Sep 17 00:00:00 2001 From: John Dupuy Date: Thu, 7 Nov 2019 15:25:05 -0600 Subject: [PATCH] Now displays player choice on terminal --- README.rst | 9 ++++++++- docnimble.json | 2 ++ docs/index.rst | 2 +- src/turn_based_game.nim | 2 ++ turn_based_game.nimble | 4 ++-- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 571d119..01ccc5f 100644 --- a/README.rst +++ b/README.rst @@ -1,11 +1,18 @@ Introduction to turn_based_game ============================================================================== -ver 1.1.5 +ver 1.1.6 .. image:: https://raw.githubusercontent.com/yglukhov/nimble-tag/master/nimble.png :height: 34 :width: 131 :alt: nimble + :target: https://nimble.directory/pkg/turnbasedgame + +.. image:: https://repo.support/img/rst-banner.png + :height: 34 + :width: 131 + :alt: repo.support + :target: https://repo.support/gh/JohnAD/turn_based_game This framework encapsulates the critical information (rules) needed for playing or simulating a turn-based game. diff --git a/docnimble.json b/docnimble.json index 216db5b..e065dc0 100644 --- a/docnimble.json +++ b/docnimble.json @@ -3,6 +3,8 @@ "purpose": "library", "repo_host_readme_url": "https://github.com/JohnAD/turn_based_game", "repo_host_docs_url": "https://github.com/JohnAD/turn_based_game/blob/master/docs/", + "nimble_url": "https://nimble.directory/pkg/turnbasedgame", + "repo_support_url": "https://repo.support/gh/JohnAD/turn_based_game", "doc_dir": "docs/", "rst_dir": "rst/", "doc_src_dir": "", diff --git a/docs/index.rst b/docs/index.rst index 82d5f5f..b67b54b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,6 +1,6 @@ Introduction to turn_based_game ============================================================================== -ver 1.1.5 +ver 1.1.6 This framework encapsulates the critical information (rules) needed for playing or simulating a turn-based game. diff --git a/src/turn_based_game.nim b/src/turn_based_game.nim index ce8bcc0..04793b1 100644 --- a/src/turn_based_game.nim +++ b/src/turn_based_game.nim @@ -375,6 +375,8 @@ method play*(self: Game) : seq[string] {.base discardable.} = move = self.current_player.get_move(self) if move == "": break + self.current_player.display("") + self.current_player.display("$1 chose \"$2\"".format(self.current_player.name, move)) result.add(move) self.current_player.display("") self.current_player.display(TAB & self.make_move(move)) diff --git a/turn_based_game.nimble b/turn_based_game.nimble index e7ba132..f6f001f 100644 --- a/turn_based_game.nimble +++ b/turn_based_game.nimble @@ -1,6 +1,6 @@ # Package -version = "1.1.5" +version = "1.1.6" author = "John Dupuy" description = "Game rules framework for turn-based games" license = "MIT" @@ -8,4 +8,4 @@ srcDir = "src" # Dependencies -requires "nim >= 0.18.0" +requires "nim >= 1.0.0"