Documentation ¶
Index ¶
- type Aliens
- func (a *Aliens) FightingSync() map[int][]int
- func (a Aliens) GetLocation(alien int) int
- func (a Aliens) IsDead(alien int) bool
- func (a Aliens) Location(alien int) int
- func (a *Aliens) MoveAlienAsync(alien int, dst int, movementLock sync.Mutex)
- func (a *Aliens) MoveAlienSync(alien int, dst int)
- func (a Aliens) NumberOfAliens() int
- func (a Aliens) NumberOfAliensAlive() int
- func (a *Aliens) SetDead(alien int)
- func (a *Aliens) SingleFight(city int, cityName string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aliens ¶
type Aliens struct {
// contains filtered or unexported fields
}
func New ¶
Init aliens locations with random cities. Assumption: we can have more than one aline per city initially, but the start fighting after the first move.
func (*Aliens) FightingSync ¶
Fighting of Aliens plus Killing and return list of destroyed Cities.
func (Aliens) GetLocation ¶
func (*Aliens) MoveAlienAsync ¶
Move Alien Async
func (Aliens) NumberOfAliens ¶
func (Aliens) NumberOfAliensAlive ¶
Click to show internal directories.
Click to hide internal directories.