Skip to content

Instantly share code, notes, and snippets.

View adam-jensen's full-sized avatar

Adam Jensen adam-jensen

View GitHub Profile
@adam-jensen
adam-jensen / gist:7238199
Created October 30, 2013 19:04
find nearest pacman food
#will faill with one food on the other side of a long wall
######
#NB save state in global variable (heeehee) and give score for moving away from it
####
checkLine(grid, pt, v, l)
for s in range(l):
pt = (pt[0] + v[0], pt[1] + v[1])
if grid[pt[0]][pt[1]]:
return True: