From: Eric S. Raymond Date: Fri, 2 Jan 2004 21:55:06 +0000 (+0000) Subject: Slight code simplification. X-Git-Tag: 6-2~6 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=e366b2b3db8aa85e627b756598504c3a86e86024;p=ski.git Slight code simplification. --- diff --git a/ski b/ski index 2dc49c8..df5ec8c 100755 --- 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