hi everybody,
I am planing to do a card game called "trex" its so popular in my place .. there are 4 players in this game.. so 52/4 = 13 cards for each player
-how to divide those card for each player randomly..
-and how to display the divided cards on form1.cs[design]
-how to assign every single card with its image for form1.cs[design]
I have the card.cs class
namespace cards_game
{
public enum Suit
{
Diamonds, Spades, Clubs, Hearts
}
public enum FaceValue
{
Two = 2, Three = 3, Four = 4, Five = 5, Six = 6, Seven = 7, Eight = 8,
Nine = 9, Ten = 10, Jack = 11, Queen = 12, King = 13, Ace = 14
}
public class Card
{
private readonly Suit suit;
private readonly FaceValue faceVal;
private bool isCardUp;
public Suit Suit { get { return suit; } }
public FaceValue FaceVal { get { return faceVal; } }
public bool IsCardUp { get { return isCardUp; } set { isCardUp = value; } }
public Card(Suit suit, FaceValue faceVal, bool isCardUp)
{
this.suit = suit;
this.faceVal = faceVal;
this.isCardUp = isCardUp;
}
public override string ToString()
{
return "The" + faceVal.ToString() + "of" + suit.ToString();
}
}
}
[Edited]Wrapped your code in "pre" tags[/Edited]