From 3b221e43397dbbb2dbc17620cd2b8751dffa1863 Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 5 Nov 2013 19:18:22 -0500 Subject: [PATCH] Slightly better formatting. --- punyverse/__main__.py | 2 +- punyverse/game.py | 14 +++++++------- punyverse/world.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/punyverse/__main__.py b/punyverse/__main__.py index fc4c679..6a1b72c 100644 --- a/punyverse/__main__.py +++ b/punyverse/__main__.py @@ -1,7 +1,7 @@ #!/usr/bin/python INITIAL_WIN_HEIGHT = 540 INITIAL_WIN_WIDTH = 700 -WIN_TITLE = "Punyverse" +WIN_TITLE = 'Punyverse' def main(): diff --git a/punyverse/game.py b/punyverse/game.py index 3f2c56d..dd52c4f 100644 --- a/punyverse/game.py +++ b/punyverse/game.py @@ -58,9 +58,9 @@ class Applet(pyglet.window.Window): super(Applet, self).__init__(*args, **kwargs) texture.init() - l = clock() + start = clock() self.fps = 0 - self.world = load_world("world.json") + self.world = load_world('world.json') print 'Initializing game...' self.speed = INITIAL_SPEED self.keys = set() @@ -187,9 +187,9 @@ class Applet(pyglet.window.Window): glLightfv(GL_LIGHT1, GL_SPECULAR, fv4(1, 1, 1, 1)) print 'Loading asteroids...' - self.asteroid_ids = [model_list(load_model(r"asteroids\01.obj"), 5, 5, 5, (0, 0, 0)), - model_list(load_model(r"asteroids\02.obj"), 5, 5, 5, (0, 0, 0)), - model_list(load_model(r"asteroids\03.obj"), 5, 5, 5, (0, 0, 0)), + self.asteroid_ids = [model_list(load_model(r'asteroids/01.obj'), 5, 5, 5, (0, 0, 0)), + model_list(load_model(r'asteroids/02.obj'), 5, 5, 5, (0, 0, 0)), + model_list(load_model(r'asteroids/03.obj'), 5, 5, 5, (0, 0, 0)), ] c = self.cam @@ -200,7 +200,7 @@ class Applet(pyglet.window.Window): for entity in self.world.tracker: entity.update() - print "Loaded in %s seconds." % (clock() - l) + print 'Loaded in %s seconds.' % (clock() - start) def set_exclusive_mouse(self, exclusive): super(Applet, self).set_exclusive_mouse(exclusive) @@ -335,7 +335,7 @@ class Applet(pyglet.window.Window): glCallList(entity.corona) glPopMatrix() - if self.cloud and hasattr(entity, "cloudmap") and entity.cloudmap: + if self.cloud and hasattr(entity, 'cloudmap') and entity.cloudmap: glPushMatrix() glEnable(GL_ALPHA_TEST) glTranslatef(*entity.location) diff --git a/punyverse/world.py b/punyverse/world.py index aa0821a..c3848ca 100644 --- a/punyverse/world.py +++ b/punyverse/world.py @@ -179,11 +179,11 @@ def load_world(file): (pitch, yaw, roll), **params)) for satellite, info in info.get('satellites', {}).iteritems(): - print "Loading %s, satellite of %s." % (satellite, name) + print 'Loading %s, satellite of %s.' % (satellite, name) body(satellite, info, object) for planet, info in root['bodies'].iteritems(): - print "Loading %s." % planet + print 'Loading %s.' % planet body(planet, info) for name, info in root['belts'].iteritems():