game

package
v0.0.0-...-234a0fc Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT 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 {
	// Board ( 10 * 7)
	Board [10][7]Char
	// Height
	Height [7]int
	// Game Status
	GameStatus Status
}

Board

func (*Board) CheckCellCount

func (b *Board) CheckCellCount(x, y, c int, z Char, board [10][7]Char, isMark bool) bool

CheckCellCount

func (*Board) DrawBoard

func (b *Board) DrawBoard()

DrawBoard

func (*Board) DrawTitle

func (b *Board) DrawTitle()

DrawTitle

func (*Board) EndGame

func (b *Board) EndGame()

EndGame

func (*Board) Init

func (b *Board) Init()

Init

func (*Board) IsDraw

func (b *Board) IsDraw() bool

IsDraw

func (*Board) Judge

func (b *Board) Judge()

Judge

func (*Board) Put

func (b *Board) Put(x int, z Char) bool

Put

type Char

type Char int

Char

const (
	Blank Char = iota
	Player
	AI
	PlayerPiece
	AIPiece
)

Display character

type Status

type Status int

Status

const (
	Playing Status = iota
	PlayerWin
	AIWin
	Draw
)

status control

Jump to

Keyboard shortcuts

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