common

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Player1 = Disk(1)
	Player2 = Disk(2)
)
View Source
const BoardSize = 8

Variables

This section is empty.

Functions

func GameOver

func GameOver(board Board) bool

func HasMoves

func HasMoves(board Board, player Disk) bool

func KeepScore

func KeepScore(board Board) (p1 int, p2 int)

Types

type Board

type Board [BoardSize][BoardSize]Disk

func ApplyMove

func ApplyMove(board Board, x int, y int, player Disk) (Board, bool)

func (Board) String

func (b Board) String() string

type Disk

type Disk uint8

Jump to

Keyboard shortcuts

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