card

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

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

Card type

func New

func New(seed seed.Seed, value int) Card

New returns a Card

func NewEmpty

func NewEmpty() Card

NewEmpty returns an empty Card

func (Card) Equals

func (c Card) Equals(card Card) bool

Equals checks cards equality

func (Card) IsBriscola

func (c Card) IsBriscola(briscola Card) bool

IsBriscola returns true if card has the same seed of the one passed

func (Card) IsExpendable

func (c Card) IsExpendable() bool

IsExpendable returns true if the card is expendable

func (Card) IsGreatherThan

func (c Card) IsGreatherThan(card Card) bool

IsGreatherThan return true if Points() of the first card are greather than the given card.

func (Card) IsValid

func (c Card) IsValid() bool

IsValid return true if the card is valid

func (Card) Points

func (c Card) Points() int

Points returns the points of a card

func (Card) Seed

func (c Card) Seed() seed.Seed

Seed returns the card seed

func (Card) String

func (c Card) String() string

func (Card) Value

func (c Card) Value() int

Value returns the card value

Jump to

Keyboard shortcuts

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