board

package
v0.0.0-...-d9556ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	RoundOneColumns []BoardColumn `json:"round1"`
	RoundTwoColumns []BoardColumn `json:"round2"`
	FinalJeopardy   Clue          `json:"final"`
	NumCategories   int           `json:"numcategories"`
}

func NewBoard

func NewBoard(numCategories int) (Board, error)

NewBoard that checks category count and constructs empty board

func (*Board) LoadData

func (c *Board) LoadData(filename string, db *sql.DB) error

type BoardColumn

type BoardColumn struct {
	Clues []Clue `json:"clues"`
}

func GetRoundColumns

func GetRoundColumns(categories []string, values []int, db *sql.DB) ([]BoardColumn, error)

type Clue

type Clue struct {
	Value    uint32 `json:"value"`
	Category string `json:"category"`
	Comments string `json:"comment"`
	Answer   string `json:"answer"`
	Question string `json:"question"`
}

func GetCluesForCategory

func GetCluesForCategory(category string, numClues int, db *sql.DB) (int, []Clue)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL