1 require 'interaction/match'
3 # This class represents a local player
10 def initialize(color, board, notify)
17 puts "resetting to #{match.state.inspect}"
18 puts "color = #{color}"
19 @board.flip!(color != :white)
20 @board.warp(match.state)
23 @board.observe :new_move do |data|
24 match.move(user, data[:move], data[:state])
29 @board.forward(data[:state], data[:move])
30 @notify[:move => "A new move has been played"]