Withdraw games on start

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@580 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Matthias Schiffer 2011-06-22 07:04:13 +02:00
parent 443e99450b
commit d2df76cae4
4 changed files with 3 additions and 3 deletions

View file

@ -272,7 +272,6 @@ public class ConnectionControl implements IConnectionControl {
public void withdrawGame() { public void withdrawGame() {
offeredGame = null; offeredGame = null;
final UUID uuid = currentGame.getGameID(); final UUID uuid = currentGame.getGameID();
currentGame = null;
run(new SendRunner() { run(new SendRunner() {
@Override @Override
protected void addData(DefaultPacketExtension extension) { protected void addData(DefaultPacketExtension extension) {

View file

@ -132,6 +132,7 @@ public class GameOfferControl extends AbstractGameBeginControl {
private void startGame() { private void startGame() {
abort(); abort();
connectionControl.startGame(); connectionControl.startGame();
connectionControl.withdrawGame();
GameSettings settings = gameData.getGameSettings(); GameSettings settings = gameData.getGameSettings();
removeVacant(settings); removeVacant(settings);

View file

@ -339,7 +339,7 @@ public class NetworkControl {
@Override @Override
public void handle() { public void handle() {
view.setBottomPanel(BottomPanelType.START_GAME_PANEL); view.setBottomPanel(BottomPanelType.START_GAME_PANEL);
createSettingsControl(); view.showGameListPanel(true);
} }
}); });

View file

@ -106,7 +106,7 @@ public class NetworkGameControl extends GameControl {
backEvent.emit(); backEvent.emit();
} }
})); }));
connections.add(view.getQuitEvent().add(new IListener() { connections.add(view.getEndProgramEvent().add(new IListener() {
@Override @Override
public void handle() { public void handle() {
System.exit(0); System.exit(0);