Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Board ¶
type Board struct { gorm.Model Name string Status int UUID string Created time.Time Started time.Time Ended time.Time Events []*Event }
Board is the board model
type Event ¶
type Event struct { gorm.Model BoardID uint `json:"board_id"` Date time.Time `json:"date_created"` SrcEntity int `json:"src_entity"` SrcEntityID string `json:"-"` // don't leak id in api SrcPos int `json:"src_pos"` DstEntity int `json:"dst_entity"` DstEntityID string `json:"-"` // don't leak id in api DstPos int `json:"dst_pos"` Action int `json:"action"` Msg string `json:"msg"` }
Event is a game event
type Player ¶
type Player struct { gorm.Model Name string UUID string Scores []PlayerGameScore }
Player is the player model
type PlayerGameScore ¶
type PlayerGameScore struct { gorm.Model PlayerID uint `json:"-"` BoardID string `json:"board_id"` Position int `json:"position"` Score int `json:"score"` DamageTaken int `json:"damage_taken"` DamageDealt int `json:"damage_dealt"` CreepKilled int `json:"killed_creep"` PlayersKilled int `json:"killed_players"` }
PlayerGameScore records the score for a player per game played
Click to show internal directories.
Click to hide internal directories.