https://github.com/brendangregg/guessinggame
Guessing game written in many programming languages
https://github.com/brendangregg/guessinggame
Last synced: 3 months ago
JSON representation
Guessing game written in many programming languages
- Host: GitHub
- URL: https://github.com/brendangregg/guessinggame
- Owner: brendangregg
- Created: 2011-11-12T22:49:49.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2023-09-21T10:43:05.000Z (over 1 year ago)
- Last Synced: 2025-01-24T20:31:33.433Z (4 months ago)
- Language: Batchfile
- Homepage: http://www.brendangregg.com/guessinggame.html
- Size: 31.3 KB
- Stars: 34
- Watchers: 4
- Forks: 30
- Open Issues: 1
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
INTRODUCTION
GuessingGame is a simple game written in a variety of programming languages, so
that the languages themselves can be compared. The program covers many
programming fundamentals: variable declaration and manipulation (strings and
integers), screen output, keyboard input, loops, if statements, file input and
file output.EXAMPLE
Below is an example of playing the guessing game. The program randomly picks a
number which you try to guess. You enter your name which is saved to a high
score file and the previous high scores are printed out. The version here is
the Perl version, however all versions are designed to appear as identical as
possible:mars:> ./guess.pl
guess.pl - Guess a number between 1 and 100
Enter guess 1: 50
Higher...
Enter guess 2: 75
Lower...
Enter guess 3: 67
Lower...
Enter guess 4: 58
Lower...
Enter guess 5: 54
Higher...
Enter guess 6: 56
Lower...
Enter guess 7: 55
Correct! That took 7 guesses.
Please enter your name: Brendan Gregg
Previous high scores,
Fred Nurk 5
Fred 6
Brendan Gregg 7And the high score file was:
mars:> ls -l highscores_pl
-rw-r--r-- 1 brendan other 35 Oct 26 01:31 highscores_plINSTALLATION
The programs are in the "src" directory. At the top of each program is a comment
that describes how to run the program, and compile it if necessary. There is no
installer (or Makefile), instead, read the programs themselves.Any additional documentation is in the "doc" directory.
LINKS
http://www.brendangregg.com/guessinggame.html project website
https://github.com/brendangregg/GuessingGame source repository