Class: Rubykon::GameScorer

Inherits:
Object
  • Object
show all
Defined in:
lib/rubykon/game_scorer.rb

Instance Method Summary collapse

Instance Method Details

#score(game) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/rubykon/game_scorer.rb', line 3

def score(game)
  game_score = {Board::BLACK => 0, Board::WHITE => game.komi}
  score_board(game, game_score)
  add_captures(game, game_score)
  determine_winner(game_score)
  game_score
end