Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScratchCard ¶
type ScratchCard struct { ID int // The ID of the card. Winning []int // List of winning numbers, i.e. if your any of your numbers match a winning number, you win points. Yours []int // Your pre-selected numbers. If any of these numbers match a winning number, you win! Copies int // Number of times the cards has been copied. }
func (*ScratchCard) Decode ¶
func (s *ScratchCard) Decode(raw string) error
func (ScratchCard) Matches ¶
func (s ScratchCard) Matches() int
Matches returns the number of winning number matches on the card.
func (ScratchCard) Points ¶
func (s ScratchCard) Points() int
Click to show internal directories.
Click to hide internal directories.