From c4afe143a96a2266aac84dc37fdf507e38c98fe4 Mon Sep 17 00:00:00 2001 From: Andrew Ardill Date: Wed, 10 Jul 2013 13:32:44 +1000 Subject: [PATCH] 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. --- script/world.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/world.js b/script/world.js index 2b2f621..5dbde21 100644 --- a/script/world.js +++ b/script/world.js @@ -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;