Beispiel #1
0
 public void StartTurn() //done.
 {
     _gameContainer.SaveRoot !.DiceNumber = 0;
     OurColor = _gameContainer.SingleInfo !.Color;
     _gameContainer.MovePlayer = 0;
     _model.Cup !.CanShowDice  = false;
     Repaint();
 }
Beispiel #2
0
 public void StartTurn()
 {
     _gameContainer.SaveRoot !.DiceNumber = 0;
     OurColor                  = _gameContainer.SingleInfo !.Color;
     PreviousPiece             = 0; //i think
     _gameContainer.MovePlayer = 0;
     _model.Cup !.CanShowDice  = false;
     SendTurn(); //i think here.
 }
Beispiel #3
0
        private int FindPlayer(EnumColorChoice thisColor) //done.
        {
            var thisPlayer = _gameContainer.PlayerList.SingleOrDefault(items => items.Color == thisColor);

            if (thisPlayer == null)
            {
                return(0);
            }
            return(thisPlayer.Id);
        }
 private async Task HomeAsync(EnumColorChoice color)
 {
     if (_gameBoard.CanGoHome(color) == false)
     {
         return;
     }
     if (_gameContainer.CanSendMessage())
     {
         await _gameContainer.Network !.SendMoveAsync(100);
     }
     await _mainGame.MakeMoveAsync(100);
 }