1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Type
TUNOCardType = (uctZero, uctOne, uctTwo, uctThree, uctFour, uctFive, uctSix, uctSeven, uctEight, uctNine, uctTakeTwo, uctPass, uctReverse, uctJoker, uctSuperJoker);
TUNOCardColor = (uccRed, uccBlue, uccGreen, uccYellow);
TUNOCard = record
CardType : TUNOCardType;
CardColor : TUNOCardColor;
CardImageIndex : Byte;
end;
TUnoDeck : Array[0..107] of TUNOCard;
TPlayerDeck :
Deck : Array of TUNOCard;
CardInHand : Byte;
// LastPlayCard : TUNOCard; // Faculatatif a voir si utile, suivant le moteur de l'IA. Peut-être un Byte qui ferai référence à l'index dans TUNODeck
end;
TPlayerNum : 2..10;
TGameDirection = (gdLeft, gdRight);
Const
cUNOCardsGame : TUNODeck =(
( CardType : uctZero ; CardColor : uccRed; CardImageIndex : 0),
( CardType : uctOne ; CardColor : uccRed; CardImageIndex : 1), ect... );
Var
NbPlayers := TPlayerNum;
Players : array[0..9] of TPlayerDeck;
Talon : TUNOCard; // Carte en cours
PickDeck : TPlayeDeck; // La pioche est similaire à un joueur
GameDirection : TGameDirection; |
Partager