From: Eric S. Raymond Date: Mon, 12 Jan 2004 02:20:15 +0000 (+0000) Subject: Shipped new release with number prefixes. X-Git-Tag: 6-4~1 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=6e83f4d4b72345954ef414066dfc22263da37673;p=ski.git Shipped new release with number prefixes. --- diff --git a/ski b/ski index 753df09..52474ac 100755 --- a/ski +++ b/ski @@ -403,10 +403,7 @@ class SkiPlayer: def do_command(self, world, cmdline): # Print a prompt, and read a command. while True: - if cmdline == "": - cmdline = "\n" cmd = cmdline[0].upper() - if cmd == '?': print __doc__ % version, terrain_key sys.stdout.write(`world`) @@ -487,6 +484,7 @@ if __name__ == "__main__": # Perform the game loop until the game is over. try: + repeat = 1 while True: sys.stdout.write(`world`) # If we are jumping, just finish the line. Otherwise, check for @@ -495,7 +493,22 @@ if __name__ == "__main__": sys.stdout.write('\n') else: player.check_obstacles(world) - player.do_command(world, raw_input("? ")) + if repeat: + repeat -= 1 + if repeat: + sys.stdout.write('\n') + else: + cmd = raw_input("? ") + if cmd == '': + cmd = '\n' + elif cmd[0] in "0123456789": + if cmd[-1] in "0123456789": + repeat = int(cmd) + cmd = '\n' + else: + repeat = int(cmd[:-1]) + cmd = cmd[-1] + player.do_command(world, cmd) world.manipulate_objects(player) world.update_level(player) player.update_player() diff --git a/ski.spec b/ski.spec index 4cfc656..75e03ad 100644 --- a/ski.spec +++ b/ski.spec @@ -1,5 +1,5 @@ Name: ski -Version: 6.3 +Version: 6.4 Release: 1 URL: http://www.catb.org/~esr/ski/ Source0: %{name}-%{version}.tar.gz @@ -7,6 +7,8 @@ License: GPL Group: Games Summary: a hotdogging game, evade the deadly Yeti on your jet-powered skis BuildRoot: %{_tmppath}/%{name}-root +BuildArch: noarch +#Keywords: game, solitaire %description Imagine you are skiing down an infinite slope, facing such hazards as @@ -23,7 +25,7 @@ you don't need fancy graphical user interfaces to have a good time. %setup -q %build -make ski.6 +make %{?_smp_mflags} ski.6 %install [ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" @@ -42,6 +44,9 @@ cp ski.6 "$RPM_BUILD_ROOT"%{_mandir}/man6/ %{_bindir}/ski %changelog +* Sun Jan 11 2004 Eric S. Raymond 6.4-1 +- Game commands now accept numeric repeat prefixes. + * Sat Jan 3 2004 Eric S. Raymond 6.3-1 - Fix bug introduced to teleport command in 6.2.