rubyknight 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/rubyknight +16 -0
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/bin/rubyknight CHANGED
@@ -47,6 +47,20 @@ def play b, eval
47
47
  b.cnotation_move "#{RubyKnight::Board.position_to_coord move[0]}#{RubyKnight::Board.position_to_coord move[1]}"
48
48
  end
49
49
 
50
+ def help
51
+ puts
52
+ puts "Enter a move such as e2e4, or a command."
53
+ puts "Commands are prefixed with !"
54
+ puts " !quit - quit"
55
+ puts " !undo - revert a move"
56
+ puts " !load <file> - load game state from a file"
57
+ puts " !dump <file> - dump game state to a file"
58
+ puts " !play - tell the computer to start playing the current color"
59
+ puts " !reset - start a new game"
60
+ puts
61
+ end
62
+
63
+ help
50
64
  cplay = false
51
65
  b = RubyKnight::Board.new
52
66
  eval = RubyKnight::BoardEvaluator.new b
@@ -72,6 +86,8 @@ $stdin.each do |move|
72
86
  when "reset"
73
87
  b = RubyKnight::Board.new
74
88
  eval = RubyKnight::BoardEvaluator.new b
89
+ when "help"
90
+ help
75
91
  end
76
92
  displayb b,eval
77
93
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyknight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moyer