chore: re-package
This commit is contained in:
@@ -7,8 +7,9 @@ import (
|
||||
"math/rand/v2"
|
||||
"slices"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
type Battle struct {
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) ProduceBombings() []*game.Bombing {
|
||||
|
||||
@@ -3,9 +3,10 @@ package controller_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
"fmt"
|
||||
"slices"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
type Cache struct {
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
// RaceID returns ID of race with given actor's name or error when race not found or extinct
|
||||
|
||||
@@ -3,13 +3,14 @@ package controller
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
|
||||
"galaxy/model/order"
|
||||
"galaxy/model/report"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/repo"
|
||||
"galaxy/server/internal/repo"
|
||||
)
|
||||
|
||||
type Configurer func(*Param)
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) CreateShips(ri int, shipTypeName string, planetNumber uint, quantity int) error {
|
||||
|
||||
@@ -3,9 +3,10 @@ package controller_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -10,8 +10,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
var fleetStateNil = game.ShipGroupState("-")
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) FleetSend(ri, fi int, planetNumber uint) error {
|
||||
|
||||
@@ -6,7 +6,8 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@ import (
|
||||
"math/rand/v2"
|
||||
"slices"
|
||||
|
||||
"galaxy/server/internal/generator"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/generator"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func NewGame(r Repo, races []string) (uuid.UUID, error) {
|
||||
|
||||
@@ -8,10 +8,11 @@ import (
|
||||
|
||||
"galaxy/util"
|
||||
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/repo"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"github.com/iliadenisov/galaxy/server/internal/repo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@ import (
|
||||
|
||||
"galaxy/model/report"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Controller) MakeTurn() error {
|
||||
|
||||
@@ -8,8 +8,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Controller) ValidateOrder(actor string, commands ...order.DecodableCommand) (err error) {
|
||||
|
||||
@@ -9,8 +9,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) PlanetRename(ri int, number int, name string) error {
|
||||
|
||||
@@ -8,9 +8,10 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) Relation(r1, r2 int) game.Relation {
|
||||
|
||||
@@ -5,7 +5,8 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -10,8 +10,9 @@ import (
|
||||
|
||||
"galaxy/util"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) Report(t uint, battles []*mr.BattleReport, bombings []*mr.Bombing) iter.Seq[*mr.Report] {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) PlanetRouteSet(ri int, rt game.RouteType, origin, destination uint) error {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -8,8 +8,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) ScienceCreate(ri int, name string, drive, weapons, shileds, cargo float64) error {
|
||||
|
||||
@@ -5,9 +5,10 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,8 +9,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) ShipClassCreate(ri int, typeName string, drive float64, ammo int, weapons, shileds, cargo float64) error {
|
||||
|
||||
@@ -11,8 +11,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
// ShipGroup is a proxy func, nothing to cache
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"galaxy/util"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) MoveShipGroups() {
|
||||
|
||||
@@ -4,7 +4,8 @@ import (
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) shipGroupSend(ri int, groupID uuid.UUID, planetNumber uint) error {
|
||||
|
||||
@@ -7,7 +7,8 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -10,8 +10,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
func (c *Cache) shipGroupUpgrade(ri int, groupID uuid.UUID, techInput string, limitLevel float64) error {
|
||||
|
||||
@@ -5,10 +5,11 @@ import (
|
||||
|
||||
e "galaxy/error"
|
||||
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
g "galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
g "github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@ import (
|
||||
"math/big"
|
||||
"slices"
|
||||
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
)
|
||||
|
||||
type VoteGroup struct {
|
||||
|
||||
@@ -3,9 +3,10 @@ package controller_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"galaxy/server/internal/controller"
|
||||
"galaxy/server/internal/model/game"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/server/internal/controller"
|
||||
"github.com/iliadenisov/galaxy/server/internal/model/game"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user