Skip to content

Commit

Permalink
ROLALLA
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbrault committed Jun 4, 2011
1 parent 31a5699 commit 86049da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/com/adrienbrault/jastermind/client/ui/GamePanel.java
Expand Up @@ -34,12 +34,7 @@ public void create() {
}

public void remove() {
if (this.boardPanel != null) {
this.remove(this.boardPanel);
}
if (this.codePegChoicePanel != null) {
this.remove(this.codePegChoicePanel);
}
this.removeAll();

this.boardPanel = null;
this.codePegChoicePanel = null;
Expand Down
17 changes: 16 additions & 1 deletion src/com/adrienbrault/jastermind/server/ServerLauncher.java
@@ -1,5 +1,6 @@
package com.adrienbrault.jastermind.server;

import javax.swing.*;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
Expand All @@ -12,9 +13,23 @@
*/
public class ServerLauncher {

final public static int SERVER_PORT = 2201;
final public static int SERVER_PORT = 2202;

public static void main(String[] args) throws IOException {
JFrame window = new JFrame();
JPanel contentPanel = new JPanel();
window.setContentPane(contentPanel);

JLabel label = new JLabel("Server running.");
contentPanel.add(label);

window.setTitle("JasterMindServer.");
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.pack();
window.setResizable(false);

window.setVisible(true);

ServerSocket serverSocket = new ServerSocket(SERVER_PORT, 5);

handleRequests(serverSocket);
Expand Down

0 comments on commit 86049da

Please sign in to comment.