Mercurial > skaapsteker
diff skaapsteker/sprites/player.py @ 253:dff6287b55b7
Prefer downward moves if all things are equal to reduce 'holding oneself against the wall in mid-air' options
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Fri, 08 Apr 2011 00:43:35 +0200 |
parents | 129afb4417cf |
children | 44cd7cfd2de3 |
line wrap: on
line diff
--- a/skaapsteker/sprites/player.py Fri Apr 08 00:43:33 2011 +0200 +++ b/skaapsteker/sprites/player.py Fri Apr 08 00:43:35 2011 +0200 @@ -127,6 +127,9 @@ if clip_area < min_area: min_area = clip_area best_move = attempt + elif clip_area == min_area and attempt[1] > best_move[1]: + # Of equal choices, prefer that which moves us downwards + best_move = attempt self.collide_rect.move_ip(best_move) self.rect.move_ip(best_move) self.init_pos()