Skip to content

Commit

Permalink
reduce code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Sep 12, 2018
1 parent 0e9861c commit 6aa053c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ogame.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,27 +194,27 @@ type Building interface {
Levelable
}

// Ship ...
type Ship interface {
type DefenderObj interface {
BaseOgameObj
GetStructuralIntegrity(Researches) int
GetShieldPower(Researches) int
GetWeaponPower(Researches) int
GetRapidfireFrom() map[ID]int
}

// Ship ...
type Ship interface {
DefenderObj
GetCargoCapacity() int
GetBaseSpeed() int
GetSpeed(researches Researches) int
GetFuelConsumption() int
GetRapidfireFrom() map[ID]int
GetRapidfireAgainst() map[ID]int
}

// Defense ...
type Defense interface {
BaseOgameObj
GetStructuralIntegrity(Researches) int
GetShieldPower(Researches) int
GetWeaponPower(Researches) int
GetRapidfireFrom() map[ID]int
DefenderObj
}

// ObjsStruct ...
Expand Down

0 comments on commit 6aa053c

Please sign in to comment.