Documentation
¶
Index ¶
Constants ¶
View Source
const ( SetMine delta = +1 SetClear delta = -1 )
View Source
const ( NA solveResult = iota - 2 Stalled Success )
Variables ¶
View Source
var Log = logrus.New()
Functions ¶
This section is empty.
Types ¶
type GameParams ¶
func (GameParams) ValidateSquare ¶
func (p GameParams) ValidateSquare(x, y int) bool
type GameState ¶
type GameState struct { GameParams Dead, Won, UsedSolve bool Grid []bool /* real mine positions */ PlayerGrid GridInfo /* player knowledge */ }
func (*GameState) ChordSquare ¶
func (*GameState) FlagSquare ¶
func (*GameState) OpenSquare ¶
func (*GameState) RevealMines ¶
func (s *GameState) RevealMines()
type GridInfo ¶
type GridInfo []SquareInfo
type SquareInfo ¶
type SquareInfo int8
const ( Todo SquareInfo = -10 // internal Question SquareInfo = -3 // ui Unknown SquareInfo = -2 Mine SquareInfo = -1 CorrectFlag SquareInfo = 64 // post-game-over Exploded SquareInfo = 65 WrongFlag SquareInfo = 66 Unflagged SquareInfo = 67 )
func (SquareInfo) String ¶
func (s SquareInfo) String() string
Click to show internal directories.
Click to hide internal directories.