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
game-data-packager(6)						   Games Manual 					     game-data-packager(6)

NAME
game-data-packager - build a .deb of game data SYNOPSIS
game-data-packager [ -i ] [ -d out-directory [ -n ] ] game [ game-options ] DESCRIPTION
Many open-source games require game data which is licensed incompatibly with the Debian Free Software Guidelines. game-data-packager is a tool designed to help you locally assemble Debian packages containing such game data from CD-ROMs, the Internet or elsewhere. OPTIONS
-i attempt to install the generated Debian package via dpkg(1) and su(1) -d out-directory writes the generated Debian package to the specified directory. -n Do not attempt to install the generated Debian package. This option must be used in conjunction with -d. game The game being packaged. Running game-data-packager without arguments will display a list of valid games. Running game-data-packager with just the game and no further arguments will display a list of valid options for that game. SEE ALSO
dpkg(1), su(1) AUTHOR
Copyright (C) 2010 Jon Dowland <jmtd@debian.org> Thanks to Branden Robinson for his 'Write the Fine Manual' presentation, once found at <http://people.debian.org/~branden/talks/wtfm/> 2008-07-14 game-data-packager(6)