Skip to content

Instantly share code, notes, and snippets.

@laserbat
Created July 5, 2011 21:11
Show Gist options
  • Save laserbat/1065957 to your computer and use it in GitHub Desktop.
Save laserbat/1065957 to your computer and use it in GitHub Desktop.
def moveMob(self,x,y,mx,my,gamemap):
"""Moves mob"""
if gamemap[mx][my].type[0] or gamemap[x][y].phasing:
ucell = gamemap[mx][my]
gamemap[mx][my] = gamemap[x][y]
gamemap[x][y] = gamemap[x][y].undercell
gamemap[mx][my].undercell = ucell
gamemap[mx][my].lit = gamemap[mx][my].undercell.lit
gamemap[mx][my].changed = True
gamemap[x][y].changed = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment