Documentation ¶
Index ¶
Constants ¶
View Source
const COLS int = 10
View Source
const ROWS int = 8
View Source
const TOTAL_NUMS int = 40
Variables ¶
This section is empty.
Functions ¶
func ValidatePicks ¶
Test all values in provided picks to ensure they don't put invalid nums
Types ¶
type Card ¶
type Card struct { CardId int `json:"card_id"` NumPicks int `json:"picks_per_game"` Picks []int `json:"picks"` GamePrice int `json:"price_per_game"` NumGames int `json:"number_games"` StartId int `json:"start_game_num"` }
A Card is an individuals card It has their "picks" (choice of nums) As well as the price per game, # of picks per game The starting game ID, and the number of games they've paid for
type Game ¶
type Game struct { Id int `json:"id"` // While the Keno board is 2D when viewing, // We store it as a flat array for easier use Board []int `json:"board"` Finished bool `json:"completed"` }
func (*Game) PickNumbers ¶
Generate a random permutation of the Keno board, taking the last 20 numbers This gives us a random set of valid numbers without repetetion
func (*Game) RenderGame ¶
func (g *Game) RenderGame()
Click to show internal directories.
Click to hide internal directories.