(Gelöst) Probleme beim Starten von Wargames

Status
Für weitere Antworten geschlossen.

Molle

New Member
Hallo Leute,

ich hab mal geschaut, was alles für Textkonsolenspiele dabei sind und stieß auf
Wargames. Nun wenn man es aber in der Konsole starten möchte kommt:
Code:
Would you like to play a game?
Nun kann man eintippen was man will, es kommt immer die Meldung:
Code:
Strange, the only winning move is not to play.
In den Man-pages zu diesem Spiel steht auch nur:
Code:
WARGAMES(6)                    BSD Games Manual                    WARGAMES(6)

NAME
     wargames - shall we play a game?

SYNOPSIS
     wargames

DESCRIPTION
     ``Shall we play a game?'' -- computer, wargames

     Just like in the movie, the computer will happily play a game with you.
     The likelihood of Global Thermonuclear Warfare resulting is much
     smaller....

SEE ALSO
     Wargames, the movie (an MGM production, PGP 13, directed by John Badham,
     1983).

AUTHOR
     This manual page was written by Joey Hess <joeyh@kitenet.net>.

BSD                            February 22, 1998                           BSD
Ist das nur ein Scherz des Autors?:confused:
 

Molle

New Member
AW: Wargames ???

Hi Rainmaker,
ja den Film kenn ich. Ist aber schon ne Weile her. Das Spiel hab ich von der Installations-DVD von Suse 10.1.

In Yast Filter auf "Selektionen", dort unter "Erfahrener Benutzer", dort unter "bsd-games".
Schau mal nach!

Gruß Molle
 

Rain_Maker

Administrator
Teammitglied
AW: Wargames ???

Code:
#!/bin/sh -
#       $NetBSD: wargames.sh,v 1.3 1999/11/16 17:27:14 abs Exp $
#
# Copyright (c) 1985, 1993
#       The Regents of the University of California.  All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#       This product includes software developed by the University of
#       California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#       @(#)wargames.sh 8.1 (Berkeley) 5/31/93
#
echo -n "Would you like to play a game? "
read x

x=`echo $x | sed 's/[^-a-z0-9]//g'`

if [ -f /usr/games/$x ] ; then
        tput clear
        exec /usr/games/$x
else
        # Original quote "Strange game, the only winning move is not to play."
        echo "Strange, the only winning move is not to play."
fi
exit 0
*Kicher* .. sehr nett.

Code:
ls -ls /usr/games/
insgesamt 2590
   1 drwxr-xr-x   2 root  root     1216 2006-10-07 16:52 .
   0 drwxr-xr-x  13 root  root      368 2006-08-26 20:17 ..
  96 -rwxr-xr-x   1 games games   96068 2006-04-23 05:22 adventure
   8 -rwxr-xr-x   1 games games    6600 2006-04-23 05:22 arithmetic
  40 -rwxr-sr-x   1 games games   40656 2006-04-23 05:22 atc
  44 -rwxr-xr-x   1 games games   43560 2006-04-23 05:22 backgammon
  16 -rwxr-xr-x   1 games games   16204 2006-04-23 05:22 banner
 156 -rwxr-sr-x   1 games games  158992 2006-04-23 05:22 battlestar
   8 -rwxr-xr-x   1 games games    5052 2006-04-23 05:22 bcd
  24 -rwxr-xr-x   1 games games   23780 2006-04-23 05:22 boggle
   8 -rwxr-xr-x   1 games games    5108 2006-04-23 05:22 caesar
  24 -rwxr-sr-x   1 games games   23820 2006-04-23 05:22 canfield
   8 -rwxr-xr-x   1 games games    5248 2006-04-23 05:22 cfscores
   8 -rwxr-xr-x   1 games games    4259 2006-04-23 05:22 countmail
  28 -rwxr-sr-x   1 games games   27360 2006-04-23 05:22 cribbage
   8 -rwxr-xr-x   1 games games    7112 2006-04-23 05:22 dm
1413 -rwxr-xr-x   1 root  root  1445744 2006-05-02 12:50 enigma
  32 -rwxr-xr-x   1 games games   31304 2006-04-23 05:22 factor
  12 -rwxr-xr-x   1 games games    8832 2006-04-23 05:22 fish
  24 -rwxr-xr-x   1 games games   23816 2006-04-23 05:22 gomoku
  12 -rwxr-xr-x   1 games games    9300 2006-04-23 05:22 hangman
  28 -rwxr-xr-x   1 games games   26812 2006-04-23 05:22 hunt
  40 -rwxr-xr-x   1 games games   40288 2006-04-23 05:22 huntd
  28 -rwxr-xr-x   1 games games   27928 2006-04-23 05:22 mille
  36 -rwxr-xr-x   1 games games   32808 2006-04-23 05:22 monop
   8 -rwxr-xr-x   1 games games    5416 2006-04-23 05:22 morse
   8 -rwxr-xr-x   1 games games    6660 2006-04-23 05:22 number
  80 -rwxr-sr-x   1 games games   78112 2006-04-23 05:22 phantasia
   8 -rwxr-xr-x   1 games games    4704 2006-04-23 05:22 pig
   8 -rwxr-xr-x   1 games games    6248 2006-04-23 05:22 pom
   4 -rwxr-xr-x   1 games games    3692 2006-04-23 05:22 ppt
  48 -rwxr-xr-x   1 games games   47144 2006-04-23 05:22 primes
  12 -rwxr-xr-x   1 games games   10140 2006-04-23 05:22 quiz
   8 -rwxr-xr-x   1 games games    6052 2006-04-23 05:22 rain
   8 -rwxr-xr-x   1 games games    4892 2006-04-23 05:22 random
  20 -rwxr-sr-x   1 games games   18732 2006-04-23 05:22 robots
   4 -rwxr-xr-x   1 games games    2001 2006-04-23 05:22 rot13
  72 -rwxr-sr-x   1 games games   69956 2006-04-23 05:22 sail
  20 -rwxr-sr-x   1 games games   17588 2006-04-23 05:22 snake
   8 -rwxr-xr-x   1 games games    4324 2006-04-23 05:22 snscore
  52 -rwxr-xr-x   1 games games   51688 2006-04-23 05:22 teachgammon
  20 -rwxr-sr-x   1 games games   18820 2006-04-23 05:22 tetris-bsd
  56 -rwxr-xr-x   1 games games   54204 2006-04-23 05:22 trek
   4 -rwxr-xr-x   1 games games    2204 2006-04-23 05:22 wargames
  12 -rwxr-xr-x   1 games games    8368 2006-04-23 05:22 worm
   8 -rwxr-xr-x   1 games games    7708 2006-04-23 05:22 worms
   4 -rwxr-xr-x   1 games games     760 2006-04-23 05:22 wtf
  16 -rwxr-xr-x   1 games games   14268 2006-04-23 05:22 wump
Ich glaube, Du solltest mal als Eingabe auf die Frage, ob Du ein Spiel spielen möchtest, eines der Games aus der Liste versuchen.

Der Programmierer hatte Humor und er hat sich am Film orientiert, so viel steht fest.

Greetz,

RM
 

spidy

Moderator
AW: Wargames ???

@RM:

Was Du immer rauskriegst, "Faszinierend" (denke du weisst woher ich das gestohlen habe) !

Mein Favorit ist "hangman".

Cheers.

Spidy
:D
 

Rain_Maker

Administrator
Teammitglied
AW: Wargames ???

Naja, meine Shellkenntnisse sind eher mässig, aber schau Dir doch mal diese Schleife an:

Code:
if [ -f /usr/games/$x ] ; then
        tput clear
        exec /usr/games/$x
else
        # Original quote "Strange game, the only winning move is not to play."
        echo "Strange, the only winning move is not to play."
fi
Falls x (= Eingabe des Users, wird weiter oben so definiert) in der Liste enthalten, dann starte das entsprechende game, falls nicht, dann spucke den Satz "Strange, the only winning move is not to play." aus.
Das "tput clear" leert wohl vorher noch den Bildschirm.

Greetz,

RM
 

spidy

Moderator
AW: Wargames ???

Du bist ein weiser Mann RM !

Ich weiss nur nicht, warum die die Spiele als "Wargames" genannt werden.

Die Absichten des Programmierers kann man nur erahnen, denn diese Games haben offensichtlich nichts mit dem Begriff "Wargames" zu tun.

Wie gesagt, ich finde hangman gut !

Cheers.

Spidy
 

Rain_Maker

Administrator
Teammitglied
AW: Wargames ???

Ich denke, das war einfach nur als Gag gedacht.

Man kann jedes andere Game auch direkt starten, der Programmierer fand wohl einfach nur den Film gut und hat deshalb dieses kleine Shellscript programmiert.

Greetz,

RM
 
Status
Für weitere Antworten geschlossen.
Oben