Documentation ¶
Overview ¶
Package deck is a generated protocol buffer package.
It is generated from these files:
deck/deck.proto
It has these top-level messages:
Card
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Card_Rank_name = map[int32]string{
0: "UNKNOWN_RANK",
1: "ACE",
2: "TWO",
3: "THREE",
4: "FOUR",
5: "FIVE",
6: "SIX",
7: "SEVEN",
8: "EIGHT",
9: "NINE",
10: "TEN",
11: "JACK",
12: "QUEEN",
13: "KING",
}
View Source
var Card_Rank_value = map[string]int32{
"UNKNOWN_RANK": 0,
"ACE": 1,
"TWO": 2,
"THREE": 3,
"FOUR": 4,
"FIVE": 5,
"SIX": 6,
"SEVEN": 7,
"EIGHT": 8,
"NINE": 9,
"TEN": 10,
"JACK": 11,
"QUEEN": 12,
"KING": 13,
}
View Source
var Card_Suit_name = map[int32]string{
0: "UNKNOWN_SUIT",
1: "HEARTS",
2: "DIAMONDS",
3: "CLUBS",
4: "SPADES",
}
View Source
var Card_Suit_value = map[string]int32{
"UNKNOWN_SUIT": 0,
"HEARTS": 1,
"DIAMONDS": 2,
"CLUBS": 3,
"SPADES": 4,
}
Functions ¶
func CardString ¶
func RankString ¶
func Sequential ¶
func SuitString ¶
Types ¶
type BySuitAndRank ¶
type BySuitAndRank []Card
Sort cards by suit and then rank.
func (BySuitAndRank) Len ¶
func (b BySuitAndRank) Len() int
func (BySuitAndRank) Less ¶
func (b BySuitAndRank) Less(i, j int) bool
func (BySuitAndRank) Swap ¶
func (b BySuitAndRank) Swap(i, j int)
type Card ¶
type Card struct { Suit Card_Suit `protobuf:"varint,1,opt,name=suit,enum=deck.Card_Suit" json:"suit,omitempty"` Rank Card_Rank `protobuf:"varint,2,opt,name=rank,enum=deck.Card_Rank" json:"rank,omitempty"` }
func (*Card) Descriptor ¶
func (*Card) ProtoMessage ¶
func (*Card) ProtoMessage()
type Card_Rank ¶
type Card_Rank int32
const ( Card_UNKNOWN_RANK Card_Rank = 0 Card_ACE Card_Rank = 1 Card_TWO Card_Rank = 2 Card_THREE Card_Rank = 3 Card_FOUR Card_Rank = 4 Card_FIVE Card_Rank = 5 Card_SIX Card_Rank = 6 Card_SEVEN Card_Rank = 7 Card_EIGHT Card_Rank = 8 Card_NINE Card_Rank = 9 Card_TEN Card_Rank = 10 Card_JACK Card_Rank = 11 Card_QUEEN Card_Rank = 12 Card_KING Card_Rank = 13 )
func (Card_Rank) EnumDescriptor ¶
Click to show internal directories.
Click to hide internal directories.