tableau

package
v0.0.0-...-3f66cf7 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tableau

type Tableau []VRow

func Deal

func Deal(c *cards.Cards) Tableau

func (Tableau) Expected

func (t Tableau) Expected() int

func (Tableau) FirstHidden

func (t Tableau) FirstHidden() (int, int)

FirstHidden returns the locatio of the first hidden card

func (Tableau) Get

func (t Tableau) Get(vRow, hRow int) (tableauCard, error)

Get returns the card at the given location or an error if that is out of bounds

func (Tableau) HighestVisible

func (t Tableau) HighestVisible() (int, int, int)

HighestVisible returns the rank and location of the highest visible card

func (Tableau) Out

func (t Tableau) Out() bool

Out returns true if the player is out (all cards exposed)

func (Tableau) Print

func (t Tableau) Print(c cards.Cards)

func (Tableau) PrintDebug

func (t Tableau) PrintDebug(c cards.Cards)

func (*Tableau) Replace

func (t *Tableau) Replace(vRow, hRow, rank int, c *cards.Cards) error

Replace replaces a tableau card with the given card

func (*Tableau) Reveal

func (t *Tableau) Reveal(vRow, hRow int, c *cards.Cards) error

Reveal reveals the given card, or returns error if that is invalid

func (*Tableau) RevealAll

func (t *Tableau) RevealAll(c *cards.Cards)

func (Tableau) Score

func (t Tableau) Score() (int, int, int)

Score returns the visible, expected, and actual scores

func (*Tableau) SetRank

func (t *Tableau) SetRank(vRow, hRow, rank int) error

Set sets the rank at the given location or returns an error if that is out of bounds

type VRow

type VRow [vRowLen]tableauCard

Jump to

Keyboard shortcuts

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