Moved call to concede to non-edt thread to see correct output on WinLose screen

This commit is contained in:
Maxmtg
2013-05-25 16:29:53 +00:00
parent b8066b2b1d
commit e8aefbcd4e
2 changed files with 12 additions and 3 deletions

View File

@@ -2110,6 +2110,7 @@ public class Player extends GameEntity implements Comparable<Player> {
* Concede.
*/
public final void concede() { // No cantLose checks - just lose
FThreads.assertExecutedByEdt(false);
setOutcome(PlayerOutcome.concede());
}

View File

@@ -91,12 +91,20 @@ public enum CDock implements ICDoc {
return;
}
Player p = findAffectedPlayer();
final Player p = findAffectedPlayer();
if( p == null ) return;
// if( c.isMindSlaved() ) return
p.concede();
game.getAction().checkStateEffects();
FThreads.invokeInNewThread(new Runnable() {
@Override
public void run() {
p.concede();
p.getGame().getAction().checkStateEffects();
}
});
game = null; // no second entry possible;
}
/**