swttt-gem 1.4.0 → 1.5.0
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.
- data/VERSION +1 -1
- data/lib/minimax_computer.rb +6 -2
- data/swttt-gem.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
data/lib/minimax_computer.rb
CHANGED
@@ -35,8 +35,12 @@ private
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def select_first_move
|
38
|
-
|
39
|
-
|
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
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:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 5
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stephen Walker
|