mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-27 09:58:08 +01:00
Stats: show the played move with the turn number
This commit is contained in:
parent
a8e65bc718
commit
f76bd47882
1 changed files with 12 additions and 1 deletions
|
@ -117,7 +117,18 @@ void StatsWidget::refresh()
|
|||
setModelHeader(col++, _q("Table"), false);
|
||||
|
||||
for (unsigned i = 1; i <= histSize; ++i)
|
||||
setModelHeader(col++, QString("#%1").arg(i), false);
|
||||
{
|
||||
QString turnString = QString("#%1").arg(i);
|
||||
// Show the move played for this turn, if it is valid
|
||||
const Move &move = m_game->getHistory().getTurn(i - 1).getMove();
|
||||
if (move.isValid())
|
||||
{
|
||||
turnString += QString(" (%1 - %2)")
|
||||
.arg(qfw(move.getRound().getWord()))
|
||||
.arg(qfw(move.getRound().getCoord().toString()));
|
||||
}
|
||||
setModelHeader(col++, turnString, false);
|
||||
}
|
||||
|
||||
setSectionHidden(col, !isArbit && !canHaveSolos && !isFreeGame);
|
||||
setModelHeader(col++, _q("Sub-total"), false);
|
||||
|
|
Loading…
Reference in a new issue