[Kde-games-devel] KNetWalk Score Calculation
Ashwin Rajeev
ashwin_rajeev at hotmail.com
Mon Mar 18 09:20:34 UTC 2013
Current score calculation of KNetWalk considers time and penalty moves( Total moves - minimum required moves to complete)
double penalty = m_gameClock->seconds() / 2.0 * (m_clickCount/2 + 1); //m_clickCount = 0 for perfect game play penalty = std::sqrt(penalty/m_scene->fieldItem()->cellCount()); // cellcount = 25 for easy, 49 for medium and 81 for hard int score = static_cast<int>(100.0 / penalty);
But there is problem with this method which is reported here : https://bugs.kde.org/show_bug.cgi?id=172089screenshot: https://bugs.kde.org/attachment.cgi?id=27674
So i proposed a simpler score calculation method which considers least score as best score = m_gameClock->seconds() + (m_clickCount * 10)
But later i realized both these scoring methods doesn't considers the minimum required moves to complete. For easy level it may vary from 13 to 29. Screenshot of my highscore: http://simplest-image-hosting.net/png-0-me1640%0A (calculated with existing method). Here i got score of 213 with 11 second because it only required 13 moves to finish the game.
Does anyone have a better solution to this issue?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20130318/be198016/attachment.html>
More information about the kde-games-devel
mailing list