game

package
v0.0.0-...-66c949c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game struct {
	Board [][]int

	Player int

	Winner int
	// contains filtered or unexported fields
}

func NewGame

func NewGame(size int) Game

func (*Game) GetGameStatus

func (g *Game) GetGameStatus() int

func (*Game) IsGameOver

func (g *Game) IsGameOver() bool

func (*Game) LegalMoves

func (g *Game) LegalMoves() []Move

func (*Game) Move

func (g *Game) Move(x int, y int) (Game, error)

func (*Game) PrintBoard

func (g *Game) PrintBoard() string

func (*Game) PrintGameStatus

func (g *Game) PrintGameStatus() string

func (*Game) PushMove

func (g *Game) PushMove(move Move) (Game, error)

type Move

type Move struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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