Re: Documentation for kmahjongg

Albert Astals Cid <[email protected]> Thu, 04 Dec 2025 12:23:26 +0100
Newsgroups gmane.comp.kde.doc
Message-ID <2807365.mvXUDI8C0e@xps15>
El dimecres, 3 de desembre del 2025, a les 7:39:55 (Hora estàndard d’Europa 
central), Shashi Warrier va escriure:
> Sirs,
> 
> It's not clear how the mahjongg score is calculated. An explanation in
> the help documentation would be useful.

If anyone has time to propose a patch to the documentation text this is the 
code that calculates the score

score = (numRemoved * 20);
// time bonus one point per second under one hour
score = score + time;
// points per cheat penalty 
score = score - (cheats * 20);


With time being 0 if you took more than one hour
With final score never being smaller than 0

Cheers,
  Albert

> 
> Thanking you,
> 
> Sincerely,
> 
> Shashi Warrier