Bug 12435 - Miniature should recognize games forfeited on time
: Miniature should recognize games forfeited on time
Status: VERIFIED FIXED
Product: Miniature
General
: master
: All All
: High normal (vote)
: 0.5
Assigned To: unassigned
: general
:
:
: 12394
: 12424
  Show dependency tree
 
Reported: 2011-09-21 00:49 UTC by Quim Gil
Modified: 2011-11-01 07:16 UTC (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Quim Gil (reporter) 2011-09-21 00:49:41 UTC
SOFTWARE VERSION: 
master

EXACT STEPS LEADING TO PROBLEM: 
1. Play a very fast game.
2. Make a player run out of time.

EXPECTED OUTCOME: 

gameoverDialog appears with 

- "You win!", "You lose..." or "Draw" depending on Miniature.Result*

- Reason "Someone needs to play faster"

- Rating adjustment.


ACTUAL OUTCOME: 
Wrong dialog due to catch-all game ending signal.


OTHER COMMENTS: 
The backend is missing the parsing of games 'forfeit on time':

"{Game 407 (GuestVXQC vs. GuestSLTQ) GuestSLTQ forfeits on time} 1-0" 

"{Game 169 (GuestBZJB vs. GuestYYMR) Game drawn because both players ran out of
time} 1/2-1/2"
Comment 1 Michael Hasselmann 2011-10-08 03:04:44 UTC
Seems to be straightforward, no further UI changes needed, right? Everything is
already there, I only need to specialize the catch-all further.
Comment 2 Quim Gil (reporter) 2011-10-08 10:25:03 UTC
Adding Miniature.ReasonTimeForfeit condition & string to OnlineBoard.

http://gitorious.org/miniature/miniature/commit/abaa322413c70f31c8da1e15ce31463860851b1c
Comment 3 Michael Hasselmann 2011-10-31 02:20:37 UTC
Fixed with fd039cf07e2ad94d7e7eb7525d4a03e16e0d8088. I also added the second
case (game draws because both players ran out of time), though I have no idea
how to test that it works.
Comment 4 Quim Gil (reporter) 2011-11-01 07:16:02 UTC
Verified for the case when a player runs out of time. Now that autoflag is
enabled by default I believe it is not possible that both players run out of
time... Anyway, good that the fix is there for this case as well.