public void PlayerWon(Player player) { if(AnyPlayerIsMoving()) { _eventPublisher.Publish(new PlayerWonEvent { Player = player }); } }
private PlayersState(IEventPublisher eventPublisher, IPhutballOptions options, Player first, Player second) { _eventPublisher = eventPublisher; _options = options; Initialize(first, second); }
private void Initialize(Player first, Player second) { First = new PlayerOnBoardInfo(first); Second = new PlayerOnBoardInfo(second); _switch = new Switch<PlayerOnBoardInfo>(First, Second); first.IsOnTheMove = false; second.IsOnTheMove = false; }
private PlayersState(Player first, Player second) : this(EventPublisher.Empty(), new PhutballOptions(), first, second) { }
public PlayerOnBoardInfo(Player player) { Player = player; _timer = new Stopwatch(); }