Documentation ¶
Index ¶
- func InitBuildingsString(buildingID []string) string
- type CalcResourcesModel
- type PlayerModel
- type TrainingQueueModel
- func (m *TrainingQueueModel) Insert(newworkers models.TrainingQueue) (uint32, error)
- func (m *TrainingQueueModel) SetTrainingToDone() error
- func (m *TrainingQueueModel) StartTrainingNewWorker(trainingQueue models.TrainingQueue) error
- func (m *TrainingQueueModel) UpdateTrainingQueue() ([]models.BuildingRowAndVillage, error)
- type VillageModel
- type VillageResourcesModel
- type VillageSetupModel
- func (m *VillageSetupModel) GetBuildingCount(villageID uint32) (string, error)
- func (m *VillageSetupModel) Insert(newVillageSetup models.VillageSetup) (uint32, error)
- func (m *VillageSetupModel) InsertWithIDCheck(village_id uint32, player_id uint32) (uint32, error)
- func (m *VillageSetupModel) Update(newVillageSetup models.VillageSetup) (uint32, error)
- func (m *VillageSetupModel) UpdateBuildingString(bString string, brv models.BuildingRowAndVillage) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitBuildingsString ¶
Types ¶
type CalcResourcesModel ¶
type CalcResourcesModel struct { DB *sqlx.DB Resources []models.Resources Workers []models.Workers }
func (*CalcResourcesModel) CalculateResources ¶
func (a *CalcResourcesModel) CalculateResources() error
func (*CalcResourcesModel) GetVillageSetupFromActivePlayers ¶
func (a *CalcResourcesModel) GetVillageSetupFromActivePlayers(playerIDs []uint32, resource []models.Resources) error
type PlayerModel ¶
func (*PlayerModel) Delete ¶
func (m *PlayerModel) Delete(pID uint32) error
type TrainingQueueModel ¶
type TrainingQueueModel struct { DB *sqlx.DB Resources []models.Resources Workers []models.Workers }
func (*TrainingQueueModel) Insert ¶
func (m *TrainingQueueModel) Insert(newworkers models.TrainingQueue) (uint32, error)
func (*TrainingQueueModel) SetTrainingToDone ¶
func (m *TrainingQueueModel) SetTrainingToDone() error
func (*TrainingQueueModel) StartTrainingNewWorker ¶
func (m *TrainingQueueModel) StartTrainingNewWorker(trainingQueue models.TrainingQueue) error
Main function
func (*TrainingQueueModel) UpdateTrainingQueue ¶
func (m *TrainingQueueModel) UpdateTrainingQueue() ([]models.BuildingRowAndVillage, error)
TODO Create new function to keep track of the progress of the workers queue
type VillageModel ¶
type VillageResourcesModel ¶
func (*VillageResourcesModel) Insert ¶
func (m *VillageResourcesModel) Insert(newPlayerResources models.VillageResource) (uint32, error)
type VillageSetupModel ¶
func (*VillageSetupModel) GetBuildingCount ¶
func (m *VillageSetupModel) GetBuildingCount(villageID uint32) (string, error)
func (*VillageSetupModel) Insert ¶
func (m *VillageSetupModel) Insert(newVillageSetup models.VillageSetup) (uint32, error)
func (*VillageSetupModel) InsertWithIDCheck ¶
func (m *VillageSetupModel) InsertWithIDCheck(village_id uint32, player_id uint32) (uint32, error)
func (*VillageSetupModel) Update ¶
func (m *VillageSetupModel) Update(newVillageSetup models.VillageSetup) (uint32, error)
func (*VillageSetupModel) UpdateBuildingString ¶
func (m *VillageSetupModel) UpdateBuildingString(bString string, brv models.BuildingRowAndVillage) (bool, error)
Click to show internal directories.
Click to hide internal directories.