Пример #1
0
func (g *Game) OnCreatureTurn(_creature pul.ICreature, _direction int) {
	if _creature.GetDirection() != _direction {
		_creature.SetDirection(_direction)

		visibleCreatures := _creature.GetVisibleCreatures()
		for _, value := range visibleCreatures {
			value.OnCreatureTurn(_creature)
		}
	}
}
Пример #2
0
func (g *Game) OnPlayerTurn(_creature pul.ICreature, _direction int) {
	if _creature.GetDirection() != _direction {
		g.OnCreatureTurn(_creature, _direction)
	}
}