Skip to content
Browse files

Corrected bug: python 2.6 doesn't like sets defined with curly braces.

  • Loading branch information...
1 parent 2ea7a74 commit 6926e2f3f52f6d6aca0f64fde7dee9370649dda4 @Niriel committed Aug 30, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/bunny/gen.py
View
16 src/bunny/gen.py
@@ -46,14 +46,14 @@ def GenerateInterestingTileMap(size, obstacle_density):
nature = tiles[seed].nature
# All the available tiles around the seed are going to be new
# seeds.
- around = {(seed[0] - 1, seed[1] - 1),
- (seed[0], seed[1] - 1),
- (seed[0] + 1, seed[1] - 1),
- (seed[0] - 1, seed[1]),
- (seed[0] + 1, seed[1]),
- (seed[0] - 1, seed[1] + 1),
- (seed[0], seed[1] + 1),
- (seed[0] + 1, seed[1] + 1)}
+ around = set(((seed[0] - 1, seed[1] - 1),
+ (seed[0], seed[1] - 1),
+ (seed[0] + 1, seed[1] - 1),
+ (seed[0] - 1, seed[1]),
+ (seed[0] + 1, seed[1]),
+ (seed[0] - 1, seed[1] + 1),
+ (seed[0], seed[1] + 1),
+ (seed[0] + 1, seed[1] + 1)))
# Sets are wonderful <3.
around &= available
seeds |= around

0 comments on commit 6926e2f

Please sign in to comment.
Something went wrong with that request. Please try again.