Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
code structure cleanup and better move retrieval from GUI
Browse files Browse the repository at this point in the history
waiting for enemy move was blocking the JavaFX thread, added service
call to get around that.
  • Loading branch information
Adam Procio committed May 19, 2019
1 parent 08ee296 commit f5fdbdc
Show file tree
Hide file tree
Showing 48 changed files with 575 additions and 300 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
compile:
mvn clean compile

client:
mvn exec:java -Dexec.arguments=client

server:
mvn exec:java -Dexec.arguments=server
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,24 @@ Client/server application using JavaFX

## Running

Compile
`
mvn clean compile
make
`

Running client
Only client -> can only play local game

`
mvn exec:java -Dexec.arguments=client
make client
`

Running server for server testing
Run server in order to play remote game

`
mvn exec:java -Dexec.arguments=server
make server
`

Run client and select new game, that's all the functionality right now.

## TODO
* [ ] Client creates it's own thread for server in case of game on 1 machine
* [ ] Gui in own thread
* [ ] Add modifiers to class datastructures (for security)
* [x] Client creates it's own thread for server in case of game on 1 machine
* [x] Communication in own thread
* [x] Add modifiers to class datastructures (for security)
4 changes: 1 addition & 3 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import java.util.concurrent.LinkedBlockingQueue;

public class Main {
public static void main(String[] args) throws Exception {
if(args == null || args.length == 0){
Expand All @@ -14,7 +12,7 @@ public static void main(String[] args) throws Exception {
} else if (args[0].equals("server")) {
/* run server */
System.out.println("Running server");
server.Runner srv = new server.Runner();
server.Runner srv = new server.Runner(8888, true);
Integer port = srv.getPort();
System.out.println("server port: " + port.toString());
srv.run();
Expand Down
185 changes: 0 additions & 185 deletions src/main/java/client/GUI/BoardGUI.java

This file was deleted.

Loading

0 comments on commit f5fdbdc

Please sign in to comment.