Changeset 253:dff6287b55b7


Ignore:
Timestamp:
04/07/11 22:43:35 (12 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
30626365363330353865323139666461376331346264373936343366353234643439323866336663
Message:

Prefer downward moves if all things are equal to reduce 'holding oneself against the wall in mid-air' options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/player.py

    r248 r253  
    128128                    min_area = clip_area
    129129                    best_move = attempt
     130                elif clip_area == min_area and attempt[1] > best_move[1]:
     131                    # Of equal choices, prefer that which moves us downwards
     132                    best_move = attempt
    130133            self.collide_rect.move_ip(best_move)
    131134            self.rect.move_ip(best_move)
Note: See TracChangeset for help on using the changeset viewer.