Skip to content

Commit

Permalink
Now displays player choice on terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAD committed Nov 7, 2019
1 parent f086eb1 commit 25861cc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
9 changes: 8 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions docnimble.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions src/turn_based_game.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions turn_based_game.nimble
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Package

version = "1.1.5"
version = "1.1.6"
author = "John Dupuy"
description = "Game rules framework for turn-based games"
license = "MIT"
srcDir = "src"

# Dependencies

requires "nim >= 0.18.0"
requires "nim >= 1.0.0"

0 comments on commit 25861cc

Please sign in to comment.