Bug 12382 - Miniature doesn't handle end games
: Miniature doesn't handle end games
Status: CLOSED FIXED
Product: Miniature
UI
: master
: All All
: High critical (vote)
: ---
Assigned To: unassigned
: general
:
:
: 12411
: 12342
  Show dependency tree
 
Reported: 2011-09-08 10:51 UTC by Uwe Kaminski
Modified: 2011-09-18 08:00 UTC (History)
3 users (show)

See Also:


Attachments


Note

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


Description Uwe Kaminski (reporter) 2011-09-08 10:51:48 UTC
SOFTWARE VERSION: 
branch

EXACT STEPS LEADING TO PROBLEM: 
1. run Miniature
2. Connect to server without using testing mode
3. Accept a game offer -> game starts
4. Tap onto the "back arrow" and select "Resign"
5. Answer dialog question with "Yes"

EXPECTED OUTCOME: 
The SeekGames window is shown. User should create a new game or accept a new
game offer.

ACTUAL OUTCOME: 
nothing happens. The OnlineBoard is shown and no more moves are possible. No
indication which is the status of the game. 

REPRODUCIBILITY: 
always

IMHO this should be a 0.4 feature
Comment 1 Quim Gil 2011-09-08 20:35:42 UTC
Yes, end games still need to be implemented. We know and it's in the casual
list handled at Bug 12342 but it is useful that you have made this explicit in
a bug to track. Thanks!
Comment 2 Michael Hasselmann 2011-09-10 23:26:48 UTC
Fixed with commit c34d84d5935c7f50be89fc5c12229f303d28e21f.
Comment 3 Quim Gil 2011-09-11 02:29:18 UTC
I just played a unrated game and no end game dialog showed up. I was not
connected to the SDK so I don't know what was going on exactly. I think the
opponent just let the time run out instead of resigning.

This evening I'll try different scenarios.
Comment 4 Michael Hasselmann 2011-09-11 02:34:39 UTC
(In reply to comment #3)
> I just played a unrated game and no end game dialog showed up. I was not
> connected to the SDK so I don't know what was going on exactly. I think the
> opponent just let the time run out instead of resigning.
> 
> This evening I'll try different scenarios.

OK, what I tried was checkmate and such. Please list the FICS messages for each
scenario here, thanks!
Comment 5 Quim Gil 2011-09-11 08:22:01 UTC
Messages to parse (I believe these are the only ones remaining...):

"{Game 153 (GuestFBVD vs. GuestBZJB) GuestFBVD forfeits on time} 0-1" 

"{Game 169 (GuestBZJB vs. GuestYYMR) Game drawn because both players ran out of
time} 1/2-1/2"

This last one is really weird and in all this years I had only hit it once
(that I remember). Currently it is relatively easy to trigger it in games with
short times due to Bug 12394 - Miniature should set autoflag 1 automatically
Comment 6 Quim Gil 2011-09-11 10:18:57 UTC
Let's keep this bug open until we are sure that all the items in the "back"
button of OlineBoard work: resign, request/accept draw, request/accept adjourn,
and the menu in that back button is the real one. 

Also related (but in fact part of SeekGame, adding it here to keep track) is
that your own new seek needs to be cleaned when it is accepted by someone else.
Otherwise you find it back when a game is finished.

I don't know if I will have time tomorrow for this, but I can attack it
frontally on Monday.
Comment 7 Uwe Kaminski (reporter) 2011-09-11 23:32:43 UTC
(In reply to comment #6)
> Let's keep this bug open until we are sure that all the items in the "back"
> button of OlineBoard work: resign, request/accept draw, request/accept adjourn,
> and the menu in that back button is the real one. 

I created a test case table in the wiki which contains all possibilities to let
a game end. This table contains all items in the back button menu. The goal of
the table is to create easy to follow description how to create a specific end
of a game and what should happen in Miniature.

If you find it useful feel free to fill the most likely cases. I'll continue
this table and open a bug report every time Miniature reacts in an other way as
supposed.
Comment 8 Uwe Kaminski (reporter) 2011-09-11 23:33:35 UTC
The table of test cases is available here:
http://wiki.maemo.org/Miniature/Development/testcases
Comment 9 Quim Gil 2011-09-12 02:06:47 UTC
(In reply to comment #6)
> Also related (but in fact part of SeekGame, adding it here to keep track) is
> that your own new seek needs to be cleaned when it is accepted by someone else.
> Otherwise you find it back when a game is finished.

Fixed:
https://gitorious.org/miniature/miniature/commit/43d1107fc8c94647c932e2055561921326ac82db
Comment 10 Quim Gil 2011-09-12 02:27:26 UTC
(In reply to comment #5)
> Messages to parse (I believe these are the only ones remaining...):
> 
> "{Game 153 (GuestFBVD vs. GuestBZJB) GuestFBVD forfeits on time} 0-1" 
> 
> "{Game 169 (GuestBZJB vs. GuestYYMR) Game drawn because both players ran out of
> time} 1/2-1/2"
> 
> This last one is really weird and in all this years I had only hit it once
> (that I remember). Currently it is relatively easy to trigger it in games with
> short times due to Bug 12394 - Miniature should set autoflag 1 automatically

The other situations that need to be plugged to the frontend are:

- Local side resigns.
- Local side requests / accepts / declines a draw. "GuestLLSB offers you a
draw." 
- Local side requests / accepts / declines adjourn. (didn't have time to
retrieve the FICS message and I must go now)
- Local side has lost the connections with the server (negotiable for 0.4, if
you ask me)

mikhas, if you give me the parameters / signals to use I can implement them in
the frontend.
Comment 11 Michael Hasselmann 2011-09-13 04:36:52 UTC
(In reply to comment #8)
> The table of test cases is available here:
> http://wiki.maemo.org/Miniature/Development/testcases

Ugh … and what is the FICS output for each scenario? Most are hopefully
similar.
Comment 12 Uwe Kaminski (reporter) 2011-09-13 09:24:31 UTC
(In reply to comment #11)
> (In reply to comment #8)
> > The table of test cases is available here:
> > http://wiki.maemo.org/Miniature/Development/testcases
> 
> Ugh … and what is the FICS output for each scenario? Most are hopefully
> similar.

Not sure if there is something inside of the output which is an always working
sign for game's end. I'll attach FICS log for every case in the wiki and create
bugs if necessary.
Comment 13 Michael Hasselmann 2011-09-13 21:13:09 UTC
User can resign now (use back button + resign option and confirm). Also use a
catch-all to find game endings. See commit
2c41da8cb4c289931123eac73a5a9f68b7e3d908. Would consider it fixed, at least for
0.4 scope.
Comment 14 Quim Gil 2011-09-13 21:41:40 UTC
mikhas will leave for 2.3 weeks in few hours and we decided to get 0.4 anyway. 

the scenarios handled in 0.4 are:

- Remote side disconnects.
- Remote or local side resigns.
- Anything else causing the end of a game (thanks to a catch-all abort
parameter that can be fine tuned for 0.5).

There is no handling of draw or adjourn requests. We must file new bugs for
these.

I still haven't got time to test the scenarios jukey has described with the
master version becoming 0.4 as we speak. jukey, if you want to do this updating
the info that would be great. Thanks to your bugs the content of 0.5 is
becoming pretty clear even before we have feedback from "real" users! Thank you
- really useful.
Comment 15 Michael Hasselmann 2011-09-13 21:56:17 UTC
Fixed abort on game one with commit f3e9b7d3fe5db15ee0528dc043463a1afa3f47d3,
too.
Comment 16 Michael Hasselmann 2011-09-13 21:56:39 UTC
s/game one/first move -I need my holidays!