mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
tscore functions no longer create zeros if not played yet
This commit is contained in:
parent
20ce218bec
commit
0c0dcaba45
@ -123,6 +123,7 @@ EX namespace yendor {
|
|||||||
int tscorelast;
|
int tscorelast;
|
||||||
|
|
||||||
EX int compute_tscore(modecode_t mc) {
|
EX int compute_tscore(modecode_t mc) {
|
||||||
|
if(!bestscore.count(mc)) return 0;
|
||||||
int tscore = 0;
|
int tscore = 0;
|
||||||
for(int i=1; i<YENDORLEVELS; i++)
|
for(int i=1; i<YENDORLEVELS; i++)
|
||||||
if(bestscore[mc][i]) tscore += 999 + bestscore[0][i];
|
if(bestscore[mc][i]) tscore += 999 + bestscore[0][i];
|
||||||
@ -785,6 +786,7 @@ EX namespace tactic {
|
|||||||
int tscorelast;
|
int tscorelast;
|
||||||
|
|
||||||
int compute_tscore(modecode_t code) {
|
int compute_tscore(modecode_t code) {
|
||||||
|
if(!recordsum.count(code)) return 0;
|
||||||
int tscore = 0;
|
int tscore = 0;
|
||||||
for(int i=0; i<landtypes; i++)
|
for(int i=0; i<landtypes; i++)
|
||||||
tscore += recordsum[code][i] * tacmultiplier(eLand(i));
|
tscore += recordsum[code][i] * tacmultiplier(eLand(i));
|
||||||
|
Loading…
Reference in New Issue
Block a user