swttt-gem 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -9,7 +9,7 @@ class MinimaxComputer
9
9
  @my_player_value = @game_board.player_value
10
10
  end
11
11
 
12
- def make_move(iteration = 0)
12
+ def move(iteration = 0)
13
13
  if first_move?
14
14
  move = first_move
15
15
  return @game_board.move(move.row, move.column)
@@ -55,7 +55,7 @@ private
55
55
 
56
56
  def path_score(row, column, iteration)
57
57
  @game_board.move(row, column)
58
- score = make_move(iteration + 1)
58
+ score = move(iteration + 1)
59
59
  @game_board.undo_move
60
60
  return score
61
61
  end
@@ -16,11 +16,11 @@ describe MinimaxComputer do
16
16
  end
17
17
 
18
18
  it "has a move" do
19
- @computer.make_move.nil?.should be_false
19
+ @computer.move.nil?.should be_false
20
20
  end
21
21
 
22
22
  it "always end in a cats game" do
23
- (0...9).each { @computer.make_move }
23
+ (0...9).each { @computer.move }
24
24
  @observer.game_over?.should be_true
25
25
  @observer.has_winner?.should be_false
26
26
  end
data/swttt-gem.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{swttt-gem}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stephen Walker"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swttt-gem
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stephen Walker