1 require 'interaction/match'
3 # This class represents a local player
10 def initialize(color, board, notify)
17 @board.flip!(color != :white)
18 @board.warp(match.state)
21 @board.observe :new_move do |data|
22 match.move(user, data[:move], data[:state])
25 @notify[:newGame => 'Starting new game']
29 @board.forward(data[:state], data[:move])
30 @notify[:move => "A new move has been played"]