deck

package
v0.0.0-...-06eecd2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 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 Deck

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

Deck represents a deck of space cards.

func New

func New(s int) *Deck

New creates a new deck of space cards.

func (*Deck) Cut

func (d *Deck) Cut(n int)

Cut cuts the deck at the provided point.

func (*Deck) Deal

func (d *Deck) Deal(n int)

Deal deals the cards to n positions.

func (*Deck) NewStack

func (d *Deck) NewStack()

NewStack deals the deck into a new stack in reverse order.

func (*Deck) PosOfCard

func (d *Deck) PosOfCard(n int) int

PosOfCard returns the position of the card of the provided value.

func (*Deck) RunInstructions

func (d *Deck) RunInstructions(p string)

RunInstructions runs the instructions provided at the given path.

Jump to

Keyboard shortcuts

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