Snake and ladder game


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Snake and ladder game
# 8  
Old 07-30-2013
Dear Don Cragun,

Smilie I feel like a fool. Smilie

I did not know about the % operator. I have various scripts generating low random numbers (password generators mainly) that have a variation of my poor attempt above that would be so much neater with your suggestion, and easier to document too.


Thanks for this nugget, I will store it away for future use. Smilie



Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Word ladder Problem

Perl - Script Rules In a Word Ladder: Players get a starting word and an ending word Starting and ending words must be the same length (PIG and HOG, or CAT and DOG) Players change one letter at a time, attempting to move from the starting word to the ending word Each intermediate step... (1 Reply)
Discussion started by: asak
1 Replies

2. What is on Your Mind?

Snake game challenge in UNIX

Hey Guys, I have made this basic snake game but it a little bit different from conventional snake game. Learned some basics of Unix. Hope you enjoy playing it. Please download and run on your machine and suggest any changes i can make. and let me know if someone could score 1000 points ;) ... (2 Replies)
Discussion started by: amit14august
2 Replies

3. Programming

Tetris Game in C++

Open Source Project: https://github.com/yongye/cpp Ported from the shell: Shell (0 Replies)
Discussion started by: complex.invoke
0 Replies

4. What is on Your Mind?

Game: Name this person

Simple rules... 1. Guess who it is, the first person to get it posts the next picture, post your guess as a reply to this thread. 2. Wait for the person who posted the picture to confirm that you are correct before posting a new picture. 3. If the person who posted the picture does not answer... (268 Replies)
Discussion started by: reborg
268 Replies
Login or Register to Ask a Question
TREK(6) 							 BSD Games Manual							   TREK(6)

NAME
trek -- trekkie game SYNOPSIS
trek [[-a] file] DESCRIPTION
trek is a game of space glory and war. Below is a summary of commands. For complete documentation, see Trek by Eric Allman. If a filename is given, a log of the game is written onto that file. If the -a flag is given before the filename, that file is appended to, not truncated. The game will ask you what length game you would like. Valid responses are ``short'', ``medium'', and ``long''. You may also type ``restart'', which restarts a previously saved game. You will then be prompted for the skill, to which you must respond ``novice'', ``fair'', ``good'', ``expert'', ``commodore'', or ``impossible''. You should normally start out with a novice and work up. In general, throughout the game, if you forget what is appropriate the game will tell you what it expects if you just type in a question mark. AUTHOR
Eric Allman SEE ALSO
/usr/share/doc/bsdgames/trek.me COMMAND SUMMARY
abandon capture cloak up/down computer request; ... damages destruct dock help impulse course distance lrscan move course distance phasers automatic amount phasers manual amt1 course1 spread1 ... torpedo course [yes] angle/no ram course distance rest time shell shields up/down srscan [yes/ no] status terminate yes/no undock visual course warp warp_factor BSD
December 30, 1993 BSD