feat: store battles and bombings
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/iliadenisov/galaxy/internal/model/game"
|
||||
"github.com/iliadenisov/galaxy/internal/model/report"
|
||||
"github.com/iliadenisov/galaxy/internal/repo"
|
||||
)
|
||||
|
||||
@@ -26,8 +27,11 @@ type Repo interface {
|
||||
// LoadStateSafe retrieves game current state without preliminary locking
|
||||
LoadStateSafe() (*game.Game, error)
|
||||
|
||||
// SaveBattle stores
|
||||
SaveBattle(t uint, b *game.BattleReport) error
|
||||
// SaveBattle stores a new battle protocol and battle meta data for turn t
|
||||
SaveBattle(t uint, b *report.BattleReport, m *game.BattleMeta) error
|
||||
|
||||
// SaveBombing stores all prodused bombings for turn t
|
||||
SaveBombings(t uint, b []report.BombingPlanetReport) error
|
||||
}
|
||||
|
||||
type Controller struct {
|
||||
|
||||
Reference in New Issue
Block a user