(JavaFX 23 + Java socket) A Linking Game (a.k.a. '连连看') with simple online multiplayer functionality.
SUSTech CS209A 2024 Fall Assignment 2.
- Main branch (
main
): Kotlin implementation version - Java implementation version (
java-backup
branch), you can check this for Java native implementation.
For documentation, it is recommended to first refer to the main
branch, as the documentation for the backup branch is no longer being updated, and there may be some minor errors in it.
A toy game. I wrote it in a short time span, and by the end the project structure was a little messy.
There may be some minor bugs that have not been addressed.
After completing the Java version, I refactored the project into Kotlin with the help of JetBrains Intellij IDEA and LLM, exploring Kotlin's syntactic sugar.
Kotlin version may have more bugs (due to rewrites) or fewer bugs (as some issues from the Java version were addressed during refactoring).
It is not a native Kotlin project, and does not use features such as coroutines
.
I completed both the basic and bonus features.
-
game-common: Shared model components used by both the client and the server.
model
: Different models for C/S transmission throughObjectI/OStream
.packet
: GeneralRequest
/Response
model.
-
game-client: JavaFX game client application.
controller
: Controllers for JavaFX.fxml
files.net
: Singletons for managing various types of client-side data.
-
game-server: Java socket game server.
net
: Singletons for managing different kinds of data for all clients.
There are 3 pre-define users:
- "1" , "1"
- "2" , "2"
- "2" , "2"
A random player to choose size.
Lines key frame animation for both players.
You can shuffle for a new shape of grids.
No beautification.