towards generation

This commit is contained in:
Ilia Denisov
2023-08-08 21:57:53 +03:00
parent d95ecbc20c
commit ffecb5d90c
9 changed files with 193 additions and 96 deletions
+39
View File
@@ -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,
}
}