Summary: | kreversi does not update score on undo | ||
---|---|---|---|
Product: | [Applications] kreversi | Reporter: | Olivier Trichet <nive> |
Component: | general | Assignee: | Inge Wallin <inge> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ana, me |
Priority: | NOR | ||
Version: | 1.7 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Olivier Trichet
2006-05-17 21:27:41 UTC
Indeed. How could I have missed this? What a terribly annoying bug. I will fix this for KDE 3.5.4 (and of course 4.0). *** Bug 125858 has been marked as a duplicate of this bug. *** SVN commit 557535 by ingwa: Fix bug 127531: kreversi does not update score on undo. - Keep track of score when removing a move too. BUG: 127531 M +8 -0 ChangeLog M +4 -0 Position.cpp M +4 -1 qreversigameview.h --- branches/KDE/3.5/kdegames/kreversi/ChangeLog #557534:557535 @@ -1,3 +1,11 @@ +2006-07-03 Inge Wallin <inge@lysator.liu.se> + + * Position.cpp (undoMove): Keep track of score when undoing a + move. + + * qreversigameview.h (removeMove): show game status after removing + a move. + 2006-07-02 Inge Wallin <inge@lysator.liu.se> * qreversigameview.cpp (moveMade): Print color Red/Blue in --- branches/KDE/3.5/kdegames/kreversi/Position.cpp #557534:557535 @@ -314,11 +314,15 @@ int sq = *it; m_board[sq / 10][sq % 10] = other; + m_score.dec(color); + m_score.inc(other); } // 2. Remove the move itself. + m_score.dec(color); m_board[move.x()][move.y()] = Nobody; + return true; } --- branches/KDE/3.5/kdegames/kreversi/qreversigameview.h #557534:557535 @@ -100,7 +100,10 @@ // Proxy methods for the movelist // FIXME: Not all of these need to be externally reachable void insertMove(QString moveString) { m_movesView->insertItem(moveString); } - void removeMove(int moveNum) { m_movesView->removeItem(moveNum); } + void removeMove(int moveNum) { + m_movesView->removeItem(moveNum); + updateStatus(); + } void setCurrentMove(int moveNum) { m_movesView->setCurrentItem(moveNum); m_movesView->ensureCurrentVisible(); SVN commit 557545 by ingwa: Fix bug 127531: kreversi does not update score on undo - Keep track of score when removing a move too. CCBUG: 127531 M +8 -0 ChangeLog M +4 -0 Position.cpp M +4 -1 qreversigameview.h --- trunk/KDE/kdegames/kreversi/ChangeLog #557544:557545 @@ -1,3 +1,11 @@ +2006-07-03 Inge Wallin <inge@lysator.liu.se> + + * Position.cpp (undoMove): Keep track of score when undoing a + move. + + * qreversigameview.h (removeMove): show game status after removing + a move. + 2006-07-02 Inge Wallin <inge@lysator.liu.se> * qreversigameview.cpp (moveMade): Print color Red/Blue in --- trunk/KDE/kdegames/kreversi/Position.cpp #557544:557545 @@ -316,11 +316,15 @@ int sq = *it; m_board[sq / 10][sq % 10] = other; + m_score.dec(color); + m_score.inc(other); } // 2. Remove the move itself. + m_score.dec(color); m_board[move.x()][move.y()] = Nobody; + return true; } --- trunk/KDE/kdegames/kreversi/qreversigameview.h #557544:557545 @@ -103,7 +103,10 @@ // Proxy methods for the movelist // FIXME: Not all of these need to be externally reachable void insertMove(QString moveString) { m_movesView->insertItem(moveString); } - void removeMove(int moveNum) { m_movesView->removeItem(moveNum); } + void removeMove(int moveNum) { + m_movesView->removeItem(moveNum); + updateStatus(); + } void setCurrentMove(int moveNum) { m_movesView->setCurrentItem(moveNum); m_movesView->ensureCurrentVisible(); |