changeset 50:ade56730daab

small cleanup wrt game & map loading
author Josef "Jeff" Sipek <jeffpc@josefsipek.net>
date Fri, 01 Jun 2007 03:08:19 -0400
parents 43a1c4c6955c
children aa52a1aa1034
files atcgame/game.py atcgame/maps.py atcgame/single.py
diffstat 3 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/atcgame/game.py	Fri Jun 01 03:01:03 2007 -0400
+++ b/atcgame/game.py	Fri Jun 01 03:08:19 2007 -0400
@@ -33,8 +33,7 @@
 			"menus": 0,
 			"planes": 1}
 	
-		self.map = MAPS[0] # FIXME: add param to chose map
-		self.map.bootstrap()
+		self.map.bootstrap_navs()
 		
 		# set up the display layers as much as possible
 		self.screen		= screen
--- a/atcgame/maps.py	Fri Jun 01 03:01:03 2007 -0400
+++ b/atcgame/maps.py	Fri Jun 01 03:08:19 2007 -0400
@@ -66,7 +66,7 @@
 		
 		self.image	= ""
 
-	def bootstrap(self):
+	def bootstrap_navs(self):
 		for nav in self.ninfo:
 			if nav["type"] == "VOR":
 				self.navs.append(beacon.VOR_Beacon(nav["name"], nav["freq"], (nav["xoff"], nav["yoff"])))
--- a/atcgame/single.py	Fri Jun 01 03:01:03 2007 -0400
+++ b/atcgame/single.py	Fri Jun 01 03:08:19 2007 -0400
@@ -32,6 +32,8 @@
 
 class Single(Game):
 	def __init__(self, screen):
+		self.map = MAPS[0] # FIXME: add param to chose map
+
 		Game.__init__(self, screen)
 
 		# background music
@@ -42,7 +44,7 @@
 	def __random_plane(self):
 		callsign	= "N1499H"
 		flightno	= "Delta 79"
-		squawk	= "1200"
+		squawk		= "1200"
 		type		= "B747"
 		vel		= (20, 20, 20)	# FIXME: use the specs