Skip to content

Commit

Permalink
ChatMessage is now sent when client closes game window
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Oct 6, 2014
1 parent b235f8e commit 0129526
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;

import com.cardshifter.api.both.ChatMessage;
import com.cardshifter.api.incoming.RequestTargetsMessage;
import com.cardshifter.api.incoming.UseAbilityMessage;
import com.cardshifter.api.messages.Message;
Expand Down Expand Up @@ -515,6 +516,7 @@ private ZoneView<?> getZoneViewForCard(int id) {
return null;
}
public void closeGame() {
this.send(new ChatMessage(1, "unused", "(Ends game " + gameId + ")"));
// run on window close
}
}
Expand Down

0 comments on commit 0129526

Please sign in to comment.