swttt-gem 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.5.0
@@ -35,8 +35,12 @@ private
35
35
  end
36
36
 
37
37
  def select_first_move
38
- return @game_board.random_corner_cell if @game_board.number_of_moves_made.zero?
39
- return middle_move
38
+ if @game_board.number_of_moves_made.zero? ||
39
+ @game_board.game_history[0] == middle_move
40
+ return @game_board.random_corner_cell if @game_board.number_of_moves_made.zero?
41
+ else
42
+ return middle_move
43
+ end
40
44
  end
41
45
 
42
46
  def middle_move
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 = "1.4.0"
8
+ s.version = "1.5.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: 7
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 4
8
+ - 5
9
9
  - 0
10
- version: 1.4.0
10
+ version: 1.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stephen Walker