ttt

package
v0.0.0-...-5388305 Latest Latest
Warning

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

Go to latest
Published: May 29, 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 Column

type Column uint
const (
	Column1 Column = iota
	Colmun2
	Colmun3
)

type MoveResult

type MoveResult int
const (
	Ok MoveResult = iota
	Win
	NoMoreMoves
	InvalidMove
)

type Player

type Player uint
const (
	Circle Player = iota
	Cross
)

func (Player) GetShapeName

func (p Player) GetShapeName() string

type Row

type Row uint
const (
	Row1 Row = iota
	Row2
	Row3
)

type TicTacToe

type TicTacToe struct {
	Map           [][]Tile
	CurrentPlayer Player
}

func CreateGame

func CreateGame() *TicTacToe

func (*TicTacToe) Move

func (t *TicTacToe) Move(row Row, column Column) MoveResult

type Tile

type Tile uint
const (
	EmptyTile Tile = iota
	CircleTile
	CrossTile
)

Jump to

Keyboard shortcuts

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