This is a template for CS209A-22fall, assignment 2.
Enter the github repository and fork the repo. Clone the repo to your local machine.
After fork and clone the repository into your local machine, if you run it immediately, you will meet IllegalStateException
. It is because javaFX
cannot find the correct position of the resource file. With IntelliJ IDEA, you can Right click the resources dict and mark it as resources.
If the result seems like this, it means that you do the right thing.
If you are using eclipse, you need to right-click Project>new>source folder, manually fill in the path of the resources directory, and then confirm.
The main function entry: src/application/Main.java
.
Now you can click the chessboard and play the game!
The java version for reference. If you want to use another java language level, maybe there will be something wrong. Feel free to explore!
You can use System.out.println(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion());
to check the version of javafx
. The following screen-shot is the version of my machine.
This is a demo view for the assignment. However, the basic functions are not complete yet. You should do it by yourself!
- Server (35pt.)
- Client/Player (35pt.)
- GUI (15pt.)
- Exception Handling (15pt.)
- Bonus (15pt.)
You need to first decouple the view and controller, divide the controller into two components: client and server, and then use socket to communicate between the two components to complete the basic functions.