Documentation ¶
Index ¶
- Constants
- Variables
- type Game
- func (g *Game) ArtifactCombine(artifactName1, artifactName2 string) (*models.Grid, error)
- func (g *Game) ArtifactDonate(artifactName string) (*models.Grid, error)
- func (g *Game) ArtifactSell(artifactName string) (*models.Grid, error)
- func (g *Game) DiscoveredArtifacts() []*artifact.Artifact
- func (g *Game) DiverExplore(gridName string) (*models.Grid, error)
- func (g *Game) DiverHire() error
- func (g *Game) DonatedArtifacts() []*artifact.Artifact
- func (g *Game) FreeUnits() (int, int, int)
- func (g *Game) MapCreate() error
- func (g *Game) MapDelete() error
- func (g *Game) MapGenerate()
- func (g *Game) MapLoad() error
- func (g *Game) MapProgress() int
- func (g *Game) SubmarineBuy() error
- func (g *Game) SubmarineExplore(gridName string) (*models.Grid, error)
Constants ¶
View Source
const ( // ShallowCount number. ShallowCount = 60 // ShallowCombinableCount number. ShallowCombinableCount = 1 // DeepCombinableCount number. DeepCombinableCount = 1 // LegendaryCount number. LegendaryCount = 1 // DiverPrice value. DiverPrice = 50 // SubmarinePrice value. SubmarinePrice = 100 )
Variables ¶
View Source
var ( // ErrNoMoney error. ErrNoMoney = errors.New("game: you have no money") // ErrNoBoat error. ErrNoBoat = errors.New("game: you have no boat") // ErrNoDiver error. ErrNoDiver = errors.New("game: you have no diver") // ErrNoSubmarine error. ErrNoSubmarine = errors.New("game: you have no submarine") // ErrNoArtifact error. ErrNoArtifact = errors.New("game: you have no artifact") // ErrInvalidArtifactPair error. ErrInvalidArtifactPair = errors.New("game: invalid artifact pair") // ErrInvalidGridName error. ErrInvalidGridName = errors.New("game: invalid grid name") // ErrInvalidGridType error. ErrInvalidGridType = errors.New("game: invalid grid type") // ErrInvalidGridStatus error. ErrInvalidGridStatus = errors.New("game: invalid grid status") // ErrInvalidGridArtifactType error. ErrInvalidGridArtifactType = errors.New("game: invalid grid artifact type") )
View Source
var ( // Cols slice. Cols = []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"} // Rows slice. Rows = []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} )
Functions ¶
This section is empty.
Types ¶
type Game ¶
type Game struct { Player *models.Player Grids []*models.Grid Explorations []string // contains filtered or unexported fields }
Game type.
func New ¶
func New( explorationRepository models.ExplorationRepository, gridRepository models.GridRepository, playerRepository models.PlayerRepository, ) *Game
New function.
func (*Game) ArtifactCombine ¶
ArtifactCombine function.
func (*Game) ArtifactDonate ¶
ArtifactDonate function.
func (*Game) ArtifactSell ¶
ArtifactSell function.
func (*Game) DiscoveredArtifacts ¶
DiscoveredArtifacts function.
func (*Game) DiverExplore ¶
DiverExplore function.
func (*Game) DonatedArtifacts ¶
DonatedArtifacts function.
Click to show internal directories.
Click to hide internal directories.