Пример #1
0
 public void PlayerWon(Player player)
 {
     if(AnyPlayerIsMoving())
     {
         _eventPublisher.Publish(new PlayerWonEvent
         {
             Player = player
         });
     }
 }
Пример #2
0
 private PlayersState(IEventPublisher eventPublisher, IPhutballOptions options, Player first, Player second)
 {
     _eventPublisher = eventPublisher;
     _options = options;
     Initialize(first, second);
 }
Пример #3
0
 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;
 }
Пример #4
0
 private PlayersState(Player first, Player second)
     : this(EventPublisher.Empty(), new PhutballOptions(), first, second)
 {
 }
Пример #5
0
 public PlayerOnBoardInfo(Player player)
 {
     Player = player;
     _timer = new Stopwatch();
 }