fix: generator deadZone overlapping
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGenerator(t *testing.T) {
|
||||
maxPlayers := 20
|
||||
maxPlayers := 30
|
||||
for players := 10; players <= maxPlayers; players++ {
|
||||
t.Run(fmt.Sprintf("%d_players", players), func(t *testing.T) {
|
||||
var s generator.MapSetting
|
||||
@@ -51,14 +51,6 @@ func TestGenerator(t *testing.T) {
|
||||
if ps.MinDistanceHW > 0 {
|
||||
for hw := range m.HomePlanets {
|
||||
d := m.ShortDistance(m.HomePlanets[hw].HW.Position, m.FreePlanets[fp].Position)
|
||||
// FIXME:
|
||||
// Error: "20" is not less than or equal to "19.98697122994701"
|
||||
// Test: TestGenerator/24_players
|
||||
// Messages: distance: HW[44.4883,136.985727] <-> %!s(generator.PlanetClass=2)[38.9977,156.203728]
|
||||
//
|
||||
// Error: "10" is not less than or equal to "9.985592188977868"
|
||||
// Test: TestGenerator/33_players
|
||||
// Messages: distance: HW[231.7975,76.996315] <-> planet_class=3[237.7334,85.026044]
|
||||
assert.LessOrEqualf(t, float64(ps.MinDistanceHW), d, "distance: HW[%.04f,%04f] <-> planet_class=%v[%.04f,%04f]",
|
||||
m.HomePlanets[hw].HW.Position.X, m.HomePlanets[hw].HW.Position.Y,
|
||||
m.FreePlanets[fp].PlanetClass,
|
||||
|
||||
Reference in New Issue
Block a user