Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/games/worms



Module Name:    src
Committed By:   kre
Date:           Tue Apr 18 15:02:22 UTC 2023

Modified Files:
        src/games/worms: worms.6 worms.c

Log Message:
Correct some unfortunate behaviour in extreme cases pointed out by RVP.
(Very long worms in a smallish window could result in the max number of
worms being 0...)

While here (also suggested by RVP) seed the random number generator,
also add a -S option to set the seed (note: while this is documented
in the updated man page, it does not appear in the usage message in
case of an error ... not likely to be used often enough to include there).

Also some minor improvements suggested by RVP:
        delete the prototype for main()
        exit curses mode before abort() (which should not happen, but...)
        no need to return (->exit) after abort() as modern abort() can
                never return.

In addition, check for extraneous (ignored) (non-option) args.
Check for absurdly small or big screens (the worm placement algorithm
doesn't work well for lines of columns < 3, and the abort() mentioned
above actually happens if one of those is == 1).

More flavours of worms added.

Some minor man page wording improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/games/worms/worms.6
cvs rdiff -u -r1.26 -r1.27 src/games/worms/worms.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index