world.js: Introduce World.VILLAGE_POS

This constant gets reused in a few places, so extract it out. Work will be
required to migrate existing code away from hard coding World.RADIUS in places
where we are talking about the village location.
This commit is contained in:
Andrew Ardill
2013-07-10 13:32:44 +10:00
parent b97f5d9914
commit c4afe143a9
+2 -1
View File
@@ -1,6 +1,7 @@
var World = {
RADIUS: 30,
VILLAGE_POS: [30, 30],
TILE: {
VILLAGE: 'A',
IRON_MINE: 'I',
@@ -810,7 +811,7 @@ var World = {
World.starvation = false;
World.thirst = false;
World.usedOutposts = {};
World.curPos = [World.RADIUS, World.RADIUS];
World.curPos = World.copyPos(World.VILLAGE_POS);
World.drawMap();
World.setTitle();
World.dead = false;