Added more stuffs to README. Cleaned up code

This commit is contained in:
2023-01-17 09:46:57 +07:00
parent 5a30b9ec12
commit 8a39daf70a
7 changed files with 145 additions and 424 deletions
+27 -1
View File
@@ -5,6 +5,31 @@ Connect 4 is a two-player zero-sum connection game. For more details on rules, p
![Connect4](https://i.imgur.com/MibgAOA.png)
## How to run the code locally
### Requirements:
- Java RE 8
- JavaFX 2
Clone the repository (duh)
```
git clone https://github.com/minhdb/ChatRoom.git
```
Here are the steps for IntelliJ IDEA. Other IDEs should have similar settings.
`File -> Project Structure -> Module -> Select Java SDK`
Add JavaFX as a dependency.
`Run -> Edit Configuration ... -> Add VM option`
```
--module-path [PATH_TO_JAVA_FX]/lib --add-modules=javafx.controls,javafx.fxml
```
## Features
· Allows either the AI or the user to play.
@@ -24,7 +49,7 @@ Computer player's using Minimax alogrithms with alpha-beta pruning. More details
The Server will always take the first turn. If it is a human player, the player will click and send the event to the client. Otherwise the AI will generate its turn and send it to the client. The client will go second. This will repeat until the game is over.
A move made over network is implemented using serialization. Here's the details:
```
public class Connect4MoveMessage implements Serializable {
public static int YELLOW = 1;
@@ -49,6 +74,7 @@ public class Connect4MoveMessage implements Serializable {
public int getColor() { … }
}
```