tictactoe 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tictactoe.rb +1 -1
- metadata +1 -1
data/lib/tictactoe.rb
CHANGED
@@ -121,7 +121,7 @@ class Tictactoe
|
|
121
121
|
result << @moves.index(element)
|
122
122
|
result
|
123
123
|
end
|
124
|
-
position_index = rand(0...indexes.size)
|
124
|
+
position_index = Random.new.rand(0...indexes.size)
|
125
125
|
values_position = indexes.values_at(position_index).first
|
126
126
|
@computer_move = values_position
|
127
127
|
@moves[values_position] = "X"
|