gamepos

package
v0.0.0-...-0992052 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pos

type Pos struct {
	PlayHand *bat.Hand
	Flags    [bat.NOFlags]*flag.Flag
	PlayDish *bat.Dish
	OppDish  *bat.Dish
	Deck     *deck.Deck
	Turn     *pub.Turn
}

Pos is a game position.

func New

func New() (pos *Pos)

New create a game position.

func (*Pos) IsBotTurn

func (pos *Pos) IsBotTurn() bool

IsBotTurn returns if it bot time to move.

func (*Pos) IsHandMove

func (pos *Pos) IsHandMove() bool

IsHandMove returns if hand move.

func (*Pos) MakeMove

func (pos *Pos) MakeMove() (moveix [2]int)

MakeMove calculate the next bot move.

func (*Pos) MakeTfMove

func (pos *Pos) MakeTfMove(probas []float64, moveixs [][2]int) (moveix [2]int)

MakeTfMove calculate the next bot move using tensorflow data.

func (*Pos) Reset

func (pos *Pos) Reset()

Reset resets the game position to before any move have been made.

func (*Pos) String

func (pos *Pos) String() string

func (*Pos) UpdMove

func (pos *Pos) UpdMove(moveView *pub.MoveView) (done bool)

UpdMove update position with a move. Return true if game is done.

Jump to

Keyboard shortcuts

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