Skip to content

Instantly share code, notes, and snippets.

@alejandroave
Last active December 17, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alejandroave/5621747 to your computer and use it in GitHub Desktop.
Save alejandroave/5621747 to your computer and use it in GitHub Desktop.
class Baliada(): ##clase de nodos principales
def __init__(self, posx,posy,life,ran):
self.posx = posx ##posicion en x
self.posy = posy ##posicion en y
self.life = life ##bateria u vida
self.ran = ran ##area de comunicacion y vista
self.cond = 0 ##condicion de movimiento o stop
self.ttl = 0 ##ttl de llegada
#def recpos(self,mx,my):
# self.posx = self.posx + mx
# self.posy = self.posy + my
#def lifes(self,gaste):
# self.life = self.life - gaste
class Benemig(): ##clase de nodo de referencia
def __init__(self, posx,posy,life):
self.posx = posx ##pos x
self.posy = posy #pos y
self.life = life # tiempo de vida
#self.ran = ran
#def recpos(self,mx,my):
# self.posx = self.posx + mx
# self.posy = self.posy + my
#def lifes(self,gaste):
# self.life = self.life -gaste
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment