HP Forums

Full Version: Error in archive HP41 software listing SWAR
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After typing (!) in the nice game "SWAR" (Space War) from here:
http://www.hpmuseum.org/software/41td/swar.htm
I noticed that there is a mistake in the listing. The line
Code:
549 211327
should have been
Code:
549 .211327
(note the point).

Can this be corrected?

(FYI: The line is part of a random number generator, which is not very random anymore if the point is missing. The game is stupid and boring without the correct random number generator, as the aliens always do the same things.)
This is more or less wat i thought - the game did not behave like the example in the manual though i used the same seed. I wondered why, looked at the part the random numbers come from, and instantly thought why one would add an integer to something if using FRC afterwards. I then looked through the other games which all use the same RNG and all of them had the point in it. Smile

Although that was hellofalotoffun to find that, wouldnt it be nicer if the code was just, like, correct?
(05-18-2016 09:54 AM)damaltor Wrote: [ -> ]This is more or less wat i thought - the game did not behave like the example in the manual though i used the same seed.

If you like, you can also have a "creative variation" of this subject: Many HP programs use this RNG, and so does the Wari program for the HP41 (cf. lineĀ 247ff). Now take a look at line 7...10. The program prompts for a seed and stores it in R00, only to delete it directly afterwards by the CLRG command... *facepalm*

(05-18-2016 09:54 AM)damaltor Wrote: [ -> ]Although that was hellofalotoffun to find that, wouldnt it be nicer if the code was just, like, correct?

Absolutely.

Dieter
Oh, that sounds clever... reminds me of this:
[Image: random_number.png]
Reference URL's