Browse code
set width and height from variables
Ed L authored on 29/07/2013 16:25:24
Showing 1 changed files
Showing 1 changed files
... | ... |
@@ -16,23 +16,25 @@ import random |
16 | 16 |
import bisect |
17 | 17 |
|
18 | 18 |
|
19 |
+WIDTH = 79 |
|
20 |
+HEIGHT = 46 |
|
19 | 21 |
class Application(object): |
20 | 22 |
def __init__(self): |
21 |
- self.screen = console.Screen(100,63) |
|
23 |
+ self.screen = console.Screen(WIDTH, HEIGHT) |
|
22 | 24 |
self.terrain_registry = map.TerrainRegistry() |
23 | 25 |
self.terrain_registry.load_from_file('data/terrain.yml') |
24 |
- self.map = map.Map(100,63, self.terrain_registry) |
|
26 |
+ self.map = map.Map(WIDTH,HEIGHT, self.terrain_registry) |
|
25 | 27 |
self.player = player.Player(4,5, self.map, combat.Adventurer.randomize()) |
26 | 28 |
self.events = events.EventHandler() |
27 | 29 |
player.ArrowHandler(self.player, self.events) |
28 | 30 |
|
29 | 31 |
self.actors = [] |
30 | 32 |
for x in range(40): |
31 |
- self.actors.append(overlay.Actor(random.randrange(100), random.randrange(63), self.map)) |
|
33 |
+ self.actors.append(overlay.Actor(random.randrange(WIDTH), random.randrange(HEIGHT), self.map)) |
|
32 | 34 |
|
33 | 35 |
self.objects = [] |
34 | 36 |
for x in range(50): |
35 |
- self.objects.append(overlay.Potion(random.randrange(100), random.randrange(63), self.map)) |
|
37 |
+ self.objects.append(overlay.Potion(random.randrange(WIDTH), random.randrange(HEIGHT), self.map)) |
|
36 | 38 |
|
37 | 39 |
tc.sys_set_fps(60) |
38 | 40 |
|