public HorizontalHandsetModel(CardModel[][] table)
        {
            
            CardModel[] hand = new CardModel[5];
            for (int x = 0; x < 5; x++)
            {
                for (int y = 0; y < 5; y++)
                {                    
                    hand[y] = table[x][y];

                }
                this.Hands.Add(new HandModel(hand));
            }
        }
        public DiagonalHandsetModel(CardModel[][] table)
        {
            
            CardModel[] hand = new CardModel[5];
            for (int x = 0; x < 5; x++)
            {
                 
                hand[x] = table[x][x]; 
            }
            this.Hands.Add(new HandModel(hand));
            
            for (int x = 0; x < 5; x++)
            {
                int y = 4 - x;                 
                hand[x] = table[x][y];

            }
            this.Hands.Add(new HandModel(hand));

            
        }
Ejemplo n.º 3
0
       public Player()
       {
           name = "User";
           isTurn = false;
           record = "0-0";
           hasCrib = false;
           currentCard = null;
           isCountUp = true;
           lastPosition = 0;
           possiblePoints = new PointCollection();
           score = 0;
        //   playerType = PlayerType.HumanPlayer;



       }
Ejemplo n.º 4
0
       public Player(PlayersType playerType, bool direction)
       {
           switch (playerType)
           {
               case PlayersType.HumanPlayer:
                   
                       name = "User";
                       number = 1;
                       isTurn = false;
                       record = "0-0";
                       hasCrib = false;
                       currentCard = null;
                       isCountUp = direction;
                       lastPosition = 0;
                       possiblePoints = new PointCollection();
                       score = 0;
                       break;

               case PlayersType.ComputerPlayer:
                        name = "Computer";
                        number = 2;
                        isTurn = false;
                        record = "0-0";
                        hasCrib = false;
                        currentCard = null;
                        isCountUp = !direction;
                        lastPosition = 0;
                        possiblePoints = new PointCollection();
                        score = 0;
                        PlayerType = PlayersType.ComputerPlayer;
                        break;

                       
                   
           }
       }
Ejemplo n.º 5
0
 public HandModel(CardModel[] cardsArray)
 {
     this.Cards = new List<CardModel>(cardsArray);
 }