towards generation
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package game
|
||||
|
||||
func CreateGame(id GameIdentifier, name string, races []Race, planets []Planet) Game {
|
||||
return Game{
|
||||
Id: id,
|
||||
Name: name,
|
||||
Turn: 0,
|
||||
Races: races,
|
||||
Planets: planets,
|
||||
}
|
||||
}
|
||||
|
||||
func CreateRace(id RaceIdentifier, name string) Race {
|
||||
return Race{
|
||||
Id: id,
|
||||
Name: name,
|
||||
Drive: 1.0,
|
||||
Weapons: 1.0,
|
||||
Shields: 1.0,
|
||||
Cargo: 1.0,
|
||||
}
|
||||
}
|
||||
|
||||
func CreatePlanet(number uint, name string, position Coordinate, size float64, res float64, pop float64) Planet {
|
||||
return Planet{
|
||||
Number: number,
|
||||
Name: name,
|
||||
Position: position,
|
||||
Size: size,
|
||||
Production: ProductionType{ProductionDrive, ""},
|
||||
Resources: res,
|
||||
Population: pop,
|
||||
|
||||
Industry: 0,
|
||||
Capital: 0,
|
||||
Material: 0,
|
||||
Colonists: 0,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user