add UpgradeBuilding functionallity

This commit is contained in:
arnaucube
2019-06-14 23:29:16 +02:00
parent c07b4edd62
commit c38f7762f4
9 changed files with 205 additions and 20 deletions

View File

@@ -1,5 +1,9 @@
package constants
import (
"github.com/arnaucube/gogame/models"
)
// game constants
const GALAXYSIZE = 50
@@ -31,3 +35,28 @@ var EnergyMineLevels = []int64{
5,
10,
}
// BuildingsNeededResources hold
// map with all the buildings, that each one is a map with the levels of the buildings with the needed ressources
var BuildingsNeededResources = map[string]map[int64]models.Resources{
"metalplant": map[int64]models.Resources{
1: models.Resources{
Metal: 50,
Crystal: 50,
Deuterium: 50,
Energy: 50,
},
2: models.Resources{
Metal: 70,
Crystal: 70,
Deuterium: 70,
Energy: 70,
},
3: models.Resources{
Metal: 90,
Crystal: 90,
Deuterium: 90,
Energy: 90,
},
},
}