Documentation ¶
Index ¶
Constants ¶
View Source
const ( NumSuit = 4 NumRanks = 13 NumCards = 4 * 13 )
Go does not have variant types :(
View Source
const ( // Nil is used to check for uninitialised ranks Nil = RANK("") // Two Rank constant Two = RANK("2") // Three Rank constant Three = RANK("3") // Four Rank constant Four = RANK("4") // Five Rank constant Five = RANK("5") // Six Rank constant Six = RANK("6") // Seven Rank constant Seven = RANK("7") // Eight Rank constant Eight = RANK("8") // Nine Rank constant Nine = RANK("9") // Ten Rank constant Ten = RANK("T") // Jack Rank constant Jack = RANK("J") // Queen Rank constant Queen = RANK("Q") // King Rank constant King = RANK("K") // Ace Rank constant Ace = RANK("A") )
View Source
const ( // Clubs Suit constant Clubs = SUIT("C") // Diamonds Suit constant Diamonds = SUIT("D") // Hearts Suit constant Hearts = SUIT("H") // Spades Suit constant Spades = SUIT("S") )
Variables ¶
View Source
var RankIndexes = map[RANK]int{ Two: 0, Three: 1, Four: 2, Five: 3, Six: 4, Seven: 5, Eight: 6, Nine: 7, Ten: 8, Jack: 9, Queen: 10, King: 11, Ace: 12, }
RankIndexes ...
View Source
var Ranks = []RANK{ Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King, Ace, }
Ranks is a slice of all ranks
SuitIndexes ...
Suits is a slice of all suits
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.