Fix rank off-by-one

This commit is contained in:
Chandler Swift 2024-02-29 18:12:38 -06:00
parent 12159d61bb
commit a9d4cea914
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -84,7 +84,7 @@
if (!city.guessed) {
city.guessed = true;
this.message = `${city.name} (population ${city.pop}) is the ${ordinal_suffix_of(rank)} most populated city in ${this.state}.`;
this.message = `${city.name} (population ${city.pop}) is the ${ordinal_suffix_of(rank + 1)} most populated city in ${this.state}.`;
this.city_guess = "";
} else {
this.message = `Already guessed ${city.name} (population ${city.pop}, rank ${rank}).`;