10 rem Portability enhancement by David Meyer (2012/2/3) 20 print tab(31);"23 MATCHES" 30 print tab(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 40 print 41 print 42 print 50 print " THIS IS A GAME CALLED '23 MATCHES'." 60 print 70 print "WHEN IT IS YOUR TURN, YOU MAY TAKE ONE, TWO, OR THREE" 80 print "MATCHES. THE OBJECT OF THE GAME IS NOT TO HAVE TO TAKE" 90 print "THE LAST MATCH." 100 print 110 print "LET'S FLIP A COIN TO SEE WHO GOES FIRST." 120 print "IF IT COMES UP HEADS, I WILL WIN THE TOSS." 130 print 140 rem 150 N=23 160 Q=INT(2*RND*5) 170 if Q=1 then goto 210 180 print "TAILS! YOU GO FIRST. " 190 print 200 goto 290 210 print "HEADS! I WIN! HA! HA!" 220 print "PREPARE TO LOSE, MEATBALL-NOSE!!" 230 print 240 print "I TAKE 2 MATCHES" 250 N=N-2 260 print "THE NUMBER OF MATCHES IS NOW";N 270 print 280 print "YOUR TURN -- YOU MAY TAKE 1, 2 OR 3 MATCHES." 290 print "HOW MANY DO YOU WISH TO REMOVE", 300 input K 310 if K>3 then goto 510 320 if K<=0 then goto 510 330 N=N-K 340 print "THERE ARE NOW";N;" MATCHES REMAINING." 350 if N=4 then goto 420 360 if N=3 then goto 440 370 if N=2 then goto 460 380 if N<=1 then goto 610 390 Z=4-K 400 goto 470 410 print 420 Z=3 430 goto 470 440 Z=2 450 goto 470 460 Z=1 470 print "MY TURN ! I REMOVE";Z;" MATCHES" 480 N=N-Z 490 if N<=1 then goto 550 500 goto 260 510 print "VERY FUNNY! DUMMY!" 520 print "DO YOU WANT TO PLAY OR GOOF AROUND?" 530 print "NOW, HOW MANY MATCHES DO YOU WANT", 540 goto 300 550 print 560 print "YOU POOR BOOB! YOU TOOK THE LAST MATCH! I GOTCHA!!" 570 print "HA ! HA ! I BEAT YOU !!!" 580 print 590 print "GOOD BYE LOSER!" 600 goto 640 610 print "YOU WON, FLOPPY EARS !" 620 print "THINK YOU'RE PRETTY SMART !" 630 print "LETS PLAY AGAIN AND I'LL BLOW YOUR SHOES OFF !!" 640 end 650