]> thyrsus.com Git - ski.git/commitdiff
Shipped new release with number prefixes.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 12 Jan 2004 02:20:15 +0000 (02:20 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 12 Jan 2004 02:20:15 +0000 (02:20 +0000)
ski
ski.spec

diff --git a/ski b/ski
index 753df0952de5f213d33b9b27553e6a3446ec615a..52474ac6036d54e877538c1b6565e4cf41ed6bf5 100755 (executable)
--- 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()
index 4cfc65686a9275abb7f3e20796872c4762d8f6a0..75e03ad710616dfb9768fb020027c07b92119938 100644 (file)
--- 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 <esr@snark.thyrsus.com> 6.4-1
+- Game commands now accept numeric repeat prefixes.
+
 * Sat Jan  3 2004 Eric S. Raymond <esr@snark.thyrsus.com> 6.3-1
 - Fix bug introduced to teleport command in 6.2.