building process calculation

This commit is contained in:
arnaucube
2019-06-16 15:05:41 +02:00
parent bf1c564a45
commit 8064e1d3b7
3 changed files with 79 additions and 12 deletions

View File

@@ -1,13 +1,26 @@
package models
import "gopkg.in/mgo.v2/bson"
import (
"time"
"gopkg.in/mgo.v2/bson"
)
type Process struct {
// if Title == "", is not active, and can build other buildings/research
Title string // building name / research name + level
Building string
Ends time.Time
}
type Planet struct {
Id bson.ObjectId `json:"id" bson:"_id,omitempty"`
Size int64 // fields/slots
Name string
OwnerId bson.ObjectId
Buildings map[string]int64
Id bson.ObjectId `json:"id" bson:"_id,omitempty"`
Size int64 // fields/slots
Name string
OwnerId bson.ObjectId
Buildings map[string]int64
CurrentBuild Process
Research Process
/*
Buildings types (in the map, all in lowcase):
MetalMine int64