feat: bomb planets
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/internal/model/game"
|
||||
"github.com/iliadenisov/galaxy/internal/number"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -104,8 +105,9 @@ func TestSpeed(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBombingPower(t *testing.T) {
|
||||
Gunship := game.ShipType{
|
||||
BattleStation := game.ShipType{
|
||||
ShipTypeReport: game.ShipTypeReport{
|
||||
Name: "Battle_Station",
|
||||
Drive: 60.0,
|
||||
Armament: 3,
|
||||
Weapons: 30.0,
|
||||
@@ -122,9 +124,9 @@ func TestBombingPower(t *testing.T) {
|
||||
game.TechCargo: 1.0,
|
||||
},
|
||||
}
|
||||
expectedBombingPower := 139.295
|
||||
result := sg.BombingPower(&Gunship)
|
||||
assert.Equal(t, expectedBombingPower, result)
|
||||
assert.Equal(t, 139.295, number.Fixed3(sg.BombingPower(&BattleStation)))
|
||||
sg.Number = 2
|
||||
assert.Equal(t, 278.590, number.Fixed3(sg.BombingPower(&BattleStation)))
|
||||
}
|
||||
|
||||
func TestDriveEffective(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user