changeset 472:1e299187884b

Fix two-colours-plus rat eating bug.
author Simon Cross <hodgestar@gmail.com>
date Sat, 17 Sep 2011 21:54:43 +0200
parents 6ec2e1e19944
children 124bfe426834
files TODO.txt mamba/snake.py
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/TODO.txt	Sat Sep 17 21:50:34 2011 +0200
+++ b/TODO.txt	Sat Sep 17 21:54:43 2011 +0200
@@ -17,7 +17,6 @@
     would require a more global cache. Maybe centralise this in
     data.py or somewhere?
   * Or at least display "Loading levels..."
-* Two colours plus eating bug
 * (Optional, this seems to be ok, from a glance) Improve Arrow behavior when on arrow and arrow rotator button
 
 Source:
--- a/mamba/snake.py	Sat Sep 17 21:50:34 2011 +0200
+++ b/mamba/snake.py	Sat Sep 17 21:54:43 2011 +0200
@@ -84,6 +84,12 @@
                 new_segment.shift_tile(tile_state)
                 for segment in self.segments[2:]:
                     segment.shift_tile(segment.get_tile_state())
+                # Fix for segment being mis-coloured when the
+                # snake passes over two consequetive paint
+                # splashes and then eats a lot of large rats
+                # Warning: Don't completely understand why this
+                #          works.
+                ds = 0
             else:
                 self.shiftup_segments(1, tile_state)