Qbasicnews.com
September 21, 2019, 08:09:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: A fresh challenge for you all  (Read 8554 times)
Nemesis
Forum Regular
**
Posts: 118



« Reply #15 on: December 18, 2004, 03:18:13 AM »

I thought this elf bowling game was fun for half a minute, I D/L it a few years back. Here's the site I believe when I googled Elf Bowling...

http://http://www.freechristmasscreensavers.com/elfbowling.htm

Seems they now have an updated version for download too.
I Didn't play the new version yet, probablly never will, (I'm real busy working on my new console style + mouse control, QBRPG...
 Awakened :evil: )

Cya,

Nemesis
Logged
aetherfox
Been there, done that
*****
Posts: 1071



WWW
« Reply #16 on: December 18, 2004, 10:15:13 AM »

You don't play bowling, you bowl.

Bowling video games are horrible.

Too bad this compo is only for QB.

I might have tried something in VB.

Anyway, laters.
Logged

~''i|~thrFx~|i''~-  
avinash.vora - http://www.avinashv.net
zshzn
Member
*
Posts: 89



WWW
« Reply #17 on: December 20, 2004, 12:11:01 AM »

Code:

cls
randomize timer
input "Throw the ball? Y/N", $ballthrow

If $ballthrow = "Y" then
print "Ball thrown. "
pinsknockedover = int(rnd*9) + 1
print "You have knocked over ", pinsknockedover, "pins."
if pinsknockedover > 8 print "Good throw"
if pinsknockedover < 9 print "Bad throw"
if pinsknockedover < 1 print "Gutter Ball"
end

else if $ballthrow = "N" then
print "Ball not thrown. Why didn't you throw the ball? You suck. You lose."
end

else print "Bad input. You lose."
end

end if
 


Done  Cheesy

I win. Forgive the horid code, I haven't coded qb in...a long long time. Not even sure if that is valid syntax there  :oops:
Logged
Dr_Davenstein
Na_th_an
*****
Posts: 2052


« Reply #18 on: December 20, 2004, 01:24:25 AM »

:lol:

The only thing I see is it should be BallThrow$, instead of $BallThrow. Wink
Logged
whitetiger0990
__/--\__
*****
Posts: 2964



WWW
« Reply #19 on: December 20, 2004, 01:55:03 AM »

and you forgot THEN


anyways I've improved it becuase I'm bored out of my mind.

[syntax="QBASIC"]CLS
RANDOMIZE TIMER
numberofpins = 10
DO
  try = try + 1
  IF try = 3 THEN PRINT "You lose."; numberofpins; "pins left.": END
 INPUT "Throw the ball? Y/N ", ballthrow$
 IF LCASE$(ballthrow$) = "y" THEN
  PRINT "Ball thrown. "
  pinsknockedover = INT(RND * numberofpins)
  numberofpins = numberofpins - pinsknockedover
  SELECT CASE pinsknockedover
   CASE numberofpins:
   IF try = 1 THEN PRINT "Strike! You win." ELSE PRINT "Spare. You win"
   END
   CASE 0: PRINT "Gutterball"
   CASE ELSE: PRINT "You have knocked over"; pinsknockedover; "pins."
  END SELECT
 ELSEIF LCASE$(ballthrow$) = "n" THEN
  PRINT "Ball not thrown. Why didn't you throw the ball? You suck. You lose."
 ELSE
  PRINT "Bad input. You lose."
  END
 END IF
LOOP[/syntax]
Logged


[size=10]Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.[/size]
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!