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

Commit

Permalink
PosXY[] ==> Move, added tests for castling and king moves
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Procio committed Nov 26, 2020
1 parent ed552e7 commit b40c859
Show file tree
Hide file tree
Showing 78 changed files with 1,039 additions and 237 deletions.
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
1 change: 1 addition & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_openjfx_javafx_base_11_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_openjfx_javafx_base_linux_11_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_openjfx_javafx_controls_11_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_openjfx_javafx_fxml_11_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_openjfx_javafx_fxml_linux_11_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_openjfx_javafx_graphics_11_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/prociada.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
compile:
mvn clean compile
mvn -X -e clean compile

client:
mvn exec:java -Dexec.arguments=client
Expand Down
30 changes: 20 additions & 10 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,41 @@ <h1>SEMESTRAL PROJECT - CHESS</h1>

<h2>Running</h2>

<p>Compile</p>

<p><code>
mvn clean compile
make
</code></p>

<p>Running client</p>
<p>Run client in order to play local games</p>

<p><code>
mvn exec:java -Dexec.arguments=client
make client
</code></p>

<p>Running server for server testing</p>
<p>Run server and two clients in order to play remote game</p>

<p><code>
mvn exec:java -Dexec.arguments=client
make server
</code></p>

<h2>How-to</h2>
<p>HIT ENTER AFTER EACH TEXTFIELD ENTRY</p>

<p>To play as white, type localhost as address and 8888 as port to play as white,
then hit connect, on second client type localhost, 8889 and check
the radio button.</p>

<p>Testing</p>

<p>Run client and select new game, that&rsquo;s all the functionality right now.</p>
<p><code>
make test
</code></p>

<h2>TODO</h2>

<ul>
<li>[ ] Client creates it&rsquo;s own thread for server in case of game on 1 machine</li>
<li>[ ] Gui in own thread</li>
<li>[ ]</li>
<li>[x] Client creates it&rsquo;s own thread for server in case of game on 1 machine</li>
<li>[x] Communication in own thread</li>
<li>[x] Add modifiers to class datastructures (for security)</li>
</ul>

27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
# SEMESTRAL PROJECT - CHESS
Client/server application using JavaFX

(**Mandatory**/Optional)
* [ ] **Chess logic**
* [ ] **JavaFX GUI (multithreading)**
* [ ] **Clock**
* [ ] **2 players 1 machine**
* [ ] **Player vs AI**
* [ ] **Save Game**
* [ ] **Manual board setup**
* [ ] Client/Server
* [ ] PGN-completeness
* [ ] Advanced AI
## Requirements

Open JDK 10

## Running

Compile

`
make
`

Only client -> can only play local game
Run client in order to play local games

`
make client
`

Run server in order to play remote game
Run server and two clients in order to play remote game

`
make server
`

HIT ENTER AFTER EACH TEXTFIELD ENTRY

To play as white, type localhost as address and 8888 as port to play as white,
then hit connect, on second client type localhost, 8889 and check
the radio button.

Testing

`
make test
`
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
<release>10</release>
</configuration>
</plugin>
<plugin>
Expand Down
Binary file added resources/glass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public class Main {
public static void main(String[] args) throws Exception {
public static void main(String[] args) {
if(args == null || args.length == 0){
/* run client */
System.out.println("[Main] Running client");
Expand All @@ -12,9 +12,7 @@ public static void main(String[] args) throws Exception {
} else if (args[0].equals("server")) {
/* run server */
System.out.println("[Main] Running server");
server.Runner srv = new server.Runner(8888, true);
Integer port = srv.getPort();
System.out.println("[Main] server port: " + port.toString());
server.Runner srv = new server.Runner(true);
srv.run();
}
}
Expand Down
Loading

0 comments on commit b40c859

Please sign in to comment.