Ejemplo n.º 1
0
func NewPlayer(p interfaces.Player) *Player {
	me := &Player{}

	me.Id = p.GetPlayerId()
	me.EntityId = p.GetEntityId()

	actions := p.GetAvailableActions()
	for k := 0; k < len(actions); k++ {
		me.AvailableActions = append(me.AvailableActions, NewAction(actions[k]))
	}

	return me
}