Bug 129488 - kreversi: wrong player (=color) names in moves window
Summary: kreversi: wrong player (=color) names in moves window
Status: RESOLVED FIXED
Alias: None
Product: kreversi
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Inge Wallin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-20 15:01 UTC by Burkhard Lück
Modified: 2006-07-02 22:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Burkhard Lück 2006-06-20 15:01:04 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

The field on the right side of the game board displays all moves in the current game.
The playernames "Black" and "White" should be reconsidered due to coloured stones, so "Black" should be changed to "Blue" and "White" to "Red".

kdestable@rebutia:~/svn$ svn diff kdegames/kreversi/qreversigameview.cpp
Index: kdegames/kreversi/qreversigameview.cpp
===================================================================
--- kdegames/kreversi/qreversigameview.cpp      (revision 542551)
+++ kdegames/kreversi/qreversigameview.cpp      (working copy)

@@ -203,8 +203,8 @@
 {
   //FIXME: Error checks.
   QString colors[] = {
-    i18n("White"),
-    i18n("Black")
+    i18n("Red"),
+    i18n("Blue")
   };
Comment 1 Inge Wallin 2006-07-01 20:17:37 UTC
This is not good enough.  You have to check if the user has chosen Red/Blue chips or Black/White ones.
Comment 2 Inge Wallin 2006-07-02 21:21:41 UTC
SVN commit 557254 by ingwa:

Fix bug 129488: kreversi: wrong player (=color) names in moves window

Write Red/Blue in addition to White/Black if the user has chosen
non-BW in the preferences.

BUG: 129488



 M  +12 -0     ChangeLog  
 M  +11 -4     qreversigameview.cpp  


--- branches/KDE/3.5/kdegames/kreversi/ChangeLog #557253:557254
@@ -1,3 +1,15 @@
+2006-07-02  Inge Wallin  <inge@lysator.liu.se>
+
+	* qreversigameview.cpp (moveMade): Print color Red/Blue in
+	addition to White/Black into the game view if non-BW color is
+	chosen in the preferences.
+
+
+	----------------------------------------------------------------
+	New start of ChangeLogging
+	----------------------------------------------------------------
+
+	
 2005-09-15  Inge Wallin  <inge@lysator.liu.se>
 
 	Bump version number for the release of KDE 3.5
--- branches/KDE/3.5/kdegames/kreversi/qreversigameview.cpp #557253:557254
@@ -59,9 +59,9 @@
 #include <kdebug.h>
 
 #include "board.h"
-#include "prefs.h"
 #include "Engine.h"
 #endif
+#include "prefs.h"
 
 #include "qreversigame.h"
 #include "qreversigameview.h"
@@ -202,14 +202,21 @@
 void QReversiGameView::moveMade(uint moveNum, Move &move)
 {
   //FIXME: Error checks.
-  QString colors[] = {
+  QString colorsWB[] = {
     i18n("White"),
     i18n("Black")
   };
+  QString colorsRB[] = {
+    i18n("Red"),
+    i18n("Blue")
+  };
 
   // Insert the new move in the listbox and mark it as the current one.
-  m_movesView->insertItem(QString("%1. %2 %3").arg(moveNum)
-			  .arg(colors[move.color()]).arg(move.asString()));
+  m_movesView->insertItem(QString("%1. %2 %3")
+			  .arg(moveNum)
+			  .arg(Prefs::grayscale() ? colorsWB[move.color()]
+			       : colorsRB[move.color()])
+			  .arg(move.asString()));
   m_movesView->setCurrentItem(moveNum - 1);
   m_movesView->ensureCurrentVisible();
 
Comment 3 Inge Wallin 2006-07-02 22:12:45 UTC
SVN commit 557282 by ingwa:

Fix bug 129488: kreversi: wrong player (=color) names in moves window

This is a forward port from the KDE 3.5 branch.

CCBUG: 129488



 M  +12 -0     ChangeLog  
 M  +11 -4     qreversigameview.cpp  


--- trunk/KDE/kdegames/kreversi/ChangeLog #557281:557282
@@ -1,3 +1,15 @@
+2006-07-02  Inge Wallin  <inge@lysator.liu.se>
+
+	* qreversigameview.cpp (moveMade): Print color Red/Blue in
+	addition to White/Black into the game view if non-BW color is
+	chosen in the preferences.
+
+
+	----------------------------------------------------------------
+	New start of ChangeLogging
+	----------------------------------------------------------------
+
+
 2005-04-04  Inge Wallin  <inge@lysator.liu.se>
 
 	Fix bug where hint and 'show legal moves' didn't work together.
--- trunk/KDE/kdegames/kreversi/qreversigameview.cpp #557281:557282
@@ -63,9 +63,9 @@
 #include <kdebug.h>
 
 #include "board.h"
-#include "prefs.h"
 #include "Engine.h"
 #endif
+#include "prefs.h"
 
 #include "qreversigame.h"
 #include "qreversigameview.h"
@@ -210,14 +210,21 @@
 void QReversiGameView::moveMade(uint moveNum, Move &move)
 {
   //FIXME: Error checks.
-  QString colors[] = {
+  QString colorsWB[] = {
     i18n("White"),
     i18n("Black")
   };
+  QString colorsRB[] = {
+    i18n("Red"),
+    i18n("Blue")
+  };
 
   // Insert the new move in the listbox and mark it as the current one.
-  m_movesView->insertItem(QString("%1. %2 %3").arg(moveNum)
-			  .arg(colors[move.color()]).arg(move.asString()));
+  m_movesView->insertItem(QString("%1. %2 %3")
+			  .arg(moveNum)
+			  .arg(Prefs::grayscale() ? colorsWB[move.color()]
+			       : colorsRB[move.color()])
+			  .arg(move.asString()));
   m_movesView->setCurrentItem(moveNum - 1);
   m_movesView->ensureCurrentVisible();