test: unknown and extict races for commands

This commit is contained in:
Ilia Denisov
2026-02-08 14:57:38 +02:00
parent c36857e702
commit 175fb98c3a
17 changed files with 292 additions and 63 deletions
+31 -2
View File
@@ -23,7 +23,10 @@ var (
game.TechShields: 1.3,
game.TechCargo: 1.4,
},
Relations: []game.RaceRelation{{RaceID: Race_1_ID, Relation: game.RelationWar}},
Relations: []game.RaceRelation{
{RaceID: Race_1_ID, Relation: game.RelationWar},
{RaceID: Race_2_ID, Relation: game.RelationWar},
},
}
Race_1 = game.Race{
ID: Race_1_ID,
@@ -36,7 +39,27 @@ var (
game.TechShields: 2.3,
game.TechCargo: 2.4,
},
Relations: []game.RaceRelation{{RaceID: Race_0_ID, Relation: game.RelationPeace}},
Relations: []game.RaceRelation{
{RaceID: Race_0_ID, Relation: game.RelationPeace},
{RaceID: Race_2_ID, Relation: game.RelationPeace},
},
}
Race_Extinct = game.Race{
ID: Race_2_ID,
VoteFor: Race_2_ID,
Name: "Race_Extinct",
Extinct: true,
TTL: 0,
Tech: map[game.Tech]game.Float{
game.TechDrive: 3.1,
game.TechWeapons: 3.2,
game.TechShields: 3.3,
game.TechCargo: 3.4,
},
Relations: []game.RaceRelation{
{RaceID: Race_0_ID, Relation: game.RelationPeace},
{RaceID: Race_1_ID, Relation: game.RelationWar},
},
}
Race_0_ID = uuid.New()
@@ -58,6 +81,8 @@ var (
Race_1_Freighter_idx = 1
Race_1_Cruiser_idx = 2
Race_2_ID = uuid.New()
Uninhabited_Planet_3_num uint = 3
Uninhabited_Planet_4_num uint = 4
@@ -71,6 +96,9 @@ var (
Shields: 15,
Cargo: 0,
}
BadEntityName = "Bad(entitty)Name"
UnknownRace = "UnknownRace"
)
// [ ] Delete this fake test
@@ -92,6 +120,7 @@ func newGame() *game.Game {
Race: []game.Race{
Race_0,
Race_1,
Race_Extinct,
},
Map: game.Map{
Width: 1000,