Changeset 257:fcaae2cfe3cd


Ignore:
Timestamp:
Sep 5, 2009, 1:00:09 PM (11 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@258
Message:

Make foxes less determistic when avoiding other foxes

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TODO

    r254 r257  
    3030
    3131* Persistent high scores
     32
     33* Better fox move logic
  • gamelib/animal.py

    r251 r257  
    396396                    min_cost = cost
    397397                    final_pos = poss
     398                if cost == min_cost and random.randint(0, 1) > 0:
     399                    # Add some randomness in this case
     400                    final_pos = poss
    398401        if not final_pos:
    399402            # No good choice, so stay put
Note: See TracChangeset for help on using the changeset viewer.