Commit 8fc5365a authored by Denis Kuplyakov's avatar Denis Kuplyakov

KReversiComputerPlayer now stores lowest setted skill

This will be used to determine score category for highscores.
parent 46cda633
......@@ -24,7 +24,7 @@
#include "kreversicomputerplayer.h"
KReversiComputerPlayer::KReversiComputerPlayer(ChipColor color, QString name):
KReversiPlayer(color, name)
KReversiPlayer(color, name), m_lowestSkill(100) // setting it big enough
{
m_engine = new Engine(1);
}
......@@ -64,6 +64,7 @@ void KReversiComputerPlayer::gameOver()
void KReversiComputerPlayer::setSkill(int skill)
{
m_engine->setStrength(skill);
m_lowestSkill = qMin(m_lowestSkill, skill);
}
......@@ -53,6 +53,7 @@ signals:
public slots:
private:
int m_lowestSkill;
Engine *m_engine;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment