master2be1 / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Use players names in end of game messages #373

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Login to FICS as a guest and start a game
2. Finish the game
3. You get the message "White player won the game - as opponent resigned"

What is the expected output? What do you see instead?
The tab with game has my nick (from Preferences - 1st human player) and
name of my opponent, but this message does not use any of that. I was
actually that mysterious "opponent" who resigned, so why is pychess
confusing me that opponent resigned?
I would expect something like "You have won the game." "You have lost."
"The game ended draw." or whatever like that.
As for reason I would use "White has resigned" "White ran out of time" or
similar... (here it is ok to use color because main message - game result -
is already clearly given).

Does it happen every time?
yes

What version of the product are you using?
0.10 alpha

Did you use an installed version of PyChess or did you run in from a
tarball/svn?
deb from debnet

Original issue reported on code.google.com by pe3...@gmail.com on 10 Jan 2009 at 8:12

GoogleCodeExporter commented 9 years ago
The messages are supposed to be usable in a human vs. human fight as well as a 
human
vs. engine or human vs. internet fight.
Do you think you can find some texts, which still obey this restriction, or do 
you
think we have to code it differently?

Original comment by lobais on 13 Jan 2009 at 3:04

GoogleCodeExporter commented 9 years ago
As you wrote, there are several cases for displaying a message:
1) human vs. human (local)
2) local vs. remote player
3) human vs. engine
4) observing a game
5) replaying a game
6) engine vs. engine

1: message should be clear for both players (neutral)
2 and 3: message is only for local player
4 and 5: message (consider if any for replaying a game) should be neutral
6: should be neutral

Maybe your approch is the right one, except I would use player's names instead 
of
"white/black". So the message would be:
"Kingoftheroad won the game - as Alwayslooser resigned"
(Kingoftheroad and Alwayslooser being names/nicks of players)
Names should be from Preferences (or engine names) for local games and nicks 
for FICS
or replaying a game.

The only problem left here I see would be if two the same engines would play 
against
each other (like Pychess vs. Pychess). That could be probably solved by a 
condition
that when white name/nick is the same as black name/nick, then "white/black" is
actually used instead of names.

Original comment by pe3...@gmail.com on 25 Jan 2009 at 4:13

GoogleCodeExporter commented 9 years ago
I like your solution very much, and will seek to implement it soon.

Original comment by lobais on 25 Jan 2009 at 4:38

GoogleCodeExporter commented 9 years ago
I've commited a fix in trunk.
If you want to have a look at the readings of the messages, check the repr 
module in
Utils.

Original comment by lobais on 9 Feb 2009 at 8:28

GoogleCodeExporter commented 9 years ago
This is fixed now, as I see it. Checked in "rev 1401."

Original comment by pe3...@gmail.com on 23 Feb 2009 at 5:43