An actual game using Terminal on the Mac is something with guessing numbers
Open the Terminal.App from your Mac by holding down command space and typing Terminal
RANDOM=$$
while true
doecho "can you guess a number between 1 and 10 : "
read
echo The number is :
echo `expr $RANDOM % 9 + 1`
echodone
can you guess a number between 1 and 10 :
3
The number is :
5can you guess a number between 1 and 10 :
4
The number is :
5can you guess a number between 1 and 10 :
9
The number is :
4can you guess a number between 1 and 10 :
The number is :
3Control-C to tell the computer to stop, remember the computer is not very smart like humans
See all posts about Fun infinite loops