Switch to 0-indexing for hint handling code.

This commit is contained in:
Jason S. Ninneman 2017-06-21 10:22:45 -07:00
parent c8f6ff3701
commit 79ffdb36f0
3 changed files with 11 additions and 11 deletions

View file

@ -87,9 +87,9 @@ long score(enum termination mode)
mxscor += 2;
/* Deduct for hints/turns/saves. Hints < 4 are special; see database desc. */
for (long i = 1; i <= HINT_COUNT; i++) {
for (long i = 0; i < HINT_COUNT; i++) {
if (game.hinted[i])
score = score - hints[i-1].penalty;
score = score - hints[i].penalty;
}
if (game.novice)
score -= 5;