Perimeter-based visibility.
authorNeil Moore <neil@s-z.org>
Thu, 5 Jun 2008 07:54:18 +0000 (03:54 -0400)
committerNeil Moore <neil@s-z.org>
Fri, 6 Jun 2008 08:13:51 +0000 (04:13 -0400)
commit8c722113c696228ebf44e1b164842d860805cf21
treed4cd2b52d154c6b71b6277a5cf9ac08a2708032c
parente55c99e76f2e863beb8ecb13d58797f9796ae7b9
Perimeter-based visibility.

Level.visible_path():
  Use a simpler loop with floating-point math, rather than Bresenham.
  Return the list of all visible coordinates along the path.

Creature.can_see():
  Adjust for change to visible_path.

Creature.visibles(): implement perimeter-based visibility testing
  Find the coordinates in the perimeter of the visibility radius (using
    Bresenham's circle algorithm).
  For each of these coordinates, compute the visible_path from me to
    there, and union it into the set of visible tiles.
creature.py
level.py