package main type FighterMode uint8 const ( Attack FighterMode = iota Toll Pass ) type DeployedFighter struct { ID ID Amount uint64 Mode FighterMode Owner ID CorpOwned bool } func (f *DeployedFighter) TollCost() uint64 { if f.Mode != Toll { return 0 } return f.Amount * 3 } func (f *DeployedFighter) Damage() int64 { if f.Mode == Pass { return 0 } return int64(f.Amount) * 6 } type DeployedMine struct { ID ID Amount uint64 Owner ID CorpOwned bool } func (m *DeployedMine) Damage() int64 { return int64(m.Amount) * 15 } type DeployedTrackerMine struct { ID ID Amount uint64 Owner ID CorpOwned bool }