Fix rank off-by-one
This commit is contained in:
parent
12159d61bb
commit
a9d4cea914
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
if (!city.guessed) {
|
if (!city.guessed) {
|
||||||
city.guessed = true;
|
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 = "";
|
this.city_guess = "";
|
||||||
} else {
|
} else {
|
||||||
this.message = `Already guessed ${city.name} (population ${city.pop}, rank ${rank}).`;
|
this.message = `Already guessed ${city.name} (population ${city.pop}, rank ${rank}).`;
|
||||||
|
|
Loading…
Reference in a new issue