Method: MCTS::Examples::DoubleStep#won?

Defined in:
lib/mcts/examples/double_step.rb

#won?(color) ⇒ Boolean

Returns:

  • (Boolean)


33
34
35
36
# File 'lib/mcts/examples/double_step.rb', line 33

def won?(color)
  fail "Game not finished" unless finished?
  @positions[color] > @positions[other_color(color)]
end