Documentation ¶
Overview ¶
Package memory is a simple example game based on memory--where players take turn flipping over two cards, and keeping them if they match.
Index ¶
Constants ¶
View Source
const DefaultMemoryFuzziness = 0.03
DefaultMemoryFuzziness is how likely the agent is to forget each thing it remembers.
View Source
const DefaultMemoryLength = 6
DefaultMemoryLength is how much the default agent should be able to remember.
Variables ¶
This section is empty.
Functions ¶
func NewDelegate ¶
func NewDelegate() boardgame.GameDelegate
NewDelegate is the primary entrypoint to this package. It returns a GameDelegate that configures a memory game.
Types ¶
type Agent ¶
type Agent struct{}
Agent represents an agent capable of playing memory.
func (*Agent) DisplayName ¶
DisplayName returns "Robby the Robot"
func (*Agent) ProposeMove ¶
func (a *Agent) ProposeMove(game *boardgame.Game, player boardgame.PlayerIndex, aState []byte) (move boardgame.Move, newState []byte)
ProposeMove is the primary logic of the memory Agent.
func (*Agent) SetUpForGame ¶
SetUpForGame configures a default agent.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.