player

package
v0.0.0-...-b92cbdf Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeaturePlayer

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

func (*FeaturePlayer) Init

func (fp *FeaturePlayer) Init(playerNum bool, featureType feature.Feature)

func (*FeaturePlayer) Move

func (fp *FeaturePlayer) Move(b *board.Board) *board.Move

type HumanPlayer

type HumanPlayer struct {
	PlayerNum bool
}

func (*HumanPlayer) Move

func (hp *HumanPlayer) Move(b *board.Board) *board.Move

type Player

type Player interface {
	// return a move given the board
	Move(b *board.Board) *board.Move
}

A player is capable of playing quoridor by specifying a move given the board setup

type RandomPlayer

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

func (*RandomPlayer) Init

func (rp *RandomPlayer) Init(playerNum bool)

func (*RandomPlayer) Move

func (rp *RandomPlayer) Move(b *board.Board) *board.Move

Jump to

Keyboard shortcuts

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