Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mugwump Game
#4
Gordon:

I'm back. I tried to play the game, and had problems, so, I started to analyse it. I found several important errors, as follows:

310
340 IF P(I, 2) <> M THEN 380
The "M" should be an "N"

Lines 330-390 are so messed up, in my opinion, that I redid them:
320 IF P(I,1) = -1 THEN 400
IF P(I,1) = M AND P(I,2) = N THEN 'new line
350 P(I,1)=-1
360 PRINT "YOU HAVE FOUND MUGWUMP";I
ELSE 'new line
380 D = SQR((I,1)-M)^2 + (P(I,2 - N)^2) 'changed 2nd M to N
390 PRINT "YOU ARE"; (INT(D*10+.5))/10;"UNITS FROM MUGWUMP";I
END IF 'new line

1010 FOR I = l TO 4
The "l" should be a "1".

With the above changes, the game gave correct results, but, after cheating and finding all four Mugwumps in five guesses, the game asked me for the 6th guess, so, it needs more fixing. That's when I gave up. Maybe you should look at your book and fix these little errors before publishing? It sure would make life easier for us!
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply


Messages In This Thread
Mugwump Game - by GordonSweet - 06-06-2006, 07:50 PM
Mugwump Game - by Ralph - 06-07-2006, 05:36 AM
Mugwump Game - by GordonSweet - 06-07-2006, 11:10 AM
Mugwump Game - by Ralph - 06-08-2006, 02:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)