-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.cs
41 lines (35 loc) · 899 Bytes
/
Card.cs
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
35
36
37
38
39
40
41
using System;
namespace BlackjackBacktest
{
public class Card
{
public enum Suits
{
Heart,
Diamond,
Club,
Spade
}
public enum Faces
{
Ace = 1, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King
}
public bool IsFaceUp;
public byte Suit;
public byte Face;
// Suits are Heart = 0, Diamond, Club, Spade
// Faces are Ace = 1, Two, Three, ... Jack, Queen, King
public Card(byte suit, byte face)
{
Suit = suit;
Face = face;
IsFaceUp = true; // default
}
public Card(byte suit, byte face, bool faceUp)
{
Suit = suit;
Face = face;
IsFaceUp = faceUp;
}
}
}