]> thyrsus.com Git - ski.git/commitdiff
Slight code simplification.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 2 Jan 2004 21:55:06 +0000 (21:55 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 2 Jan 2004 21:55:06 +0000 (21:55 +0000)
ski

diff --git a/ski b/ski
index 2dc49c82b8f2fd684a41358d4fa6fd37d5682c34..df5ec8c00b3b2a3dae8b84f311560237c764a85e 100755 (executable)
--- a/ski
+++ b/ski
@@ -165,15 +165,12 @@ class SkiWorld:
         self.prob_ground = [0.0, 30.0, 70.0, 90.0]
 
        self.level_num = 0
-       self.player_pos = LINE_LEN / 2
+       self.player_pos = random.choice(range(LINE_LEN))
        self.yeti = None
        self.icbm_pos = None
        self.demon_pos = None
        self.slope = [REP_SNOW] * LINE_LEN
 
-        # Initialize the player's position.
-        self.player_pos = random.choice(range(LINE_LEN))
-
         # Randomize the appearance probabilities.
         self.prob_tree[0] = (random.randint(0, 99)) / 500.0 + 0.05
         self.prob_ice[0] = (random.randint(0, 99)) / 500.0 + 0.05