ygo

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var YGOPlugin = ygoPlugin{
	// contains filtered or unexported fields
}

YGOPlugin is the exported plugin for this module

Functions

This section is empty.

Types

type CardIDs

type CardIDs struct {
	// IDs are the card IDs.
	IDs []int64
	// Counts is a map of card ID to count (number of cards).
	Counts map[int64]int
}

CardIDs contains the card IDs and their count.

func NewCardIDs

func NewCardIDs() *CardIDs

NewCardIDs creates a new CardIDs struct.

func (*CardIDs) Count

func (c *CardIDs) Count(id int64) int

Count return the number of cards for a given ID.

func (*CardIDs) Insert

func (c *CardIDs) Insert(id int64)

Insert a new card in a CardIDs struct.

func (*CardIDs) InsertCount

func (c *CardIDs) InsertCount(id int64, count int)

InsertCount inserts several new cards in a CardIDs struct.

func (*CardIDs) String

func (c *CardIDs) String() string

String representation of a CardIDs struct.

type CardNames

type CardNames struct {
	// Names are the card names.
	Names []string
	// Counts is a map of card name to count (number of this card in the deck).
	Counts map[string]int
}

CardNames contains the card names and their count.

func NewCardNames

func NewCardNames() *CardNames

NewCardNames creates a new CardNames struct.

func (*CardNames) Count

func (c *CardNames) Count(name string) int

Count return the number of cards for a given name.

func (*CardNames) Insert

func (c *CardNames) Insert(name string)

Insert a new card in a CardNames struct.

func (*CardNames) InsertCount

func (c *CardNames) InsertCount(name string, count int)

InsertCount inserts several new cards in a CardNames struct.

func (*CardNames) String

func (c *CardNames) String() string

String representation of a CardNames struct.

type DeckType

type DeckType int

DeckType is the type of a parsed deck.

const (
	// None means the deck type being parsed hasn't been determined yet
	None DeckType = iota
	// Main deck
	Main
	// Extra deck
	Extra
	// Side deck
	Side
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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