Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 6926e2f3f52f6d6aca0f64fde7dee9370649dda4 1 parent 2ea7a74
Niriel authored

Showing 1 changed file with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. +8 8 src/bunny/gen.py
16 src/bunny/gen.py
@@ -46,14 +46,14 @@ def GenerateInterestingTileMap(size, obstacle_density):
46 46 nature = tiles[seed].nature
47 47 # All the available tiles around the seed are going to be new
48 48 # seeds.
49   - around = {(seed[0] - 1, seed[1] - 1),
50   - (seed[0], seed[1] - 1),
51   - (seed[0] + 1, seed[1] - 1),
52   - (seed[0] - 1, seed[1]),
53   - (seed[0] + 1, seed[1]),
54   - (seed[0] - 1, seed[1] + 1),
55   - (seed[0], seed[1] + 1),
56   - (seed[0] + 1, seed[1] + 1)}
  49 + around = set(((seed[0] - 1, seed[1] - 1),
  50 + (seed[0], seed[1] - 1),
  51 + (seed[0] + 1, seed[1] - 1),
  52 + (seed[0] - 1, seed[1]),
  53 + (seed[0] + 1, seed[1]),
  54 + (seed[0] - 1, seed[1] + 1),
  55 + (seed[0], seed[1] + 1),
  56 + (seed[0] + 1, seed[1] + 1)))
57 57 # Sets are wonderful <3.
58 58 around &= available
59 59 seeds |= around

0 comments on commit 6926e2f

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