A simple microservice based implementation of the Lights Out game. The backend uses Javalin with a Jetty service. The frontend client is a desktop app using JavaFX. This project is designed to provide a working example for my students in CS 3321 - Introduction to Software Engineering here at Idaho State University.
This project is composed of three modules: i) the library module contains some basic shared code for the client and the server. So no installation will be needed as it will be provided to both. ii) The server can be installed by simply running the following command:
$ gradle :server:assembleThis will produce the files server/build/distributions/lo-server.tar and server/build/distributions/lo-server.zip. You can then simply copy and unpack these wherever you wish the server to be installed.
iii) The client is very similar to the server. To produce the installable program, you simply execute the following command:
$ gradle :client:assembleThis will produce the files client/build/distributions/lo-client.tar and client/build/distributions/lo-client.zip. You can then simply copy and unpack these wherever you wish the client to be installed.
For both the client and server, you can also add the appropriate paths (plus "/bin") to your PATH environment variable so that the appropriate commands may be directly executed from the command line.
The server can be started in one of three ways (depending on your installation)
-
If you did not follow the installation instructions, but you have cloned this repo, then you can either:
-
Run the following gradle command (if you have gradle installed):
$ gradle :server:run
-
If you do not have gradle installed, use the following command:
$ gradlew :server:run
-
-
If you did install the program, but did not alter your
PATHenvironment variable then the following command will be needed:$ cd <directory you installed it to> $ ./bin/lo-server
-
Finally, if you did the installation and updated your
PATHvariable, then all that is needed is to execute the following command:$ lo-server
Once the server is up and running, you should see something like the following:
Once the server is running, it can be stopped by simply killing it using Ctrl-C or the like. But, keep the server running and turn your attention to the Client.
The client can be started in one of three ways (depending on your installation)
-
If you did not follow the installation instructions, but you have cloned this repo, then you can either:
-
Run the following gradle command (if you have gradle installed):
$ gradle :client:run
-
If you do not have gradle installed, use the following command:
$ gradlew :client:run
-
-
If you did install the program, but did not alter your
PATHenvironment variable then the following command will be needed:$ cd <directory you installed it to> $ ./bin/lo-client
-
Finally, if you did the installation and updated your
PATHvariable, then all that is needed is to execute the following command:$ lo-client
Once running, the client should open a window similar to the following:
Here you simply need to put in the address (host name) for the server (if running on the same machine as the client, localhost will do), and then enter the port number (7000). Once you have entered that information, go ahead and press the "Connect" button (note: if you made a mistake go ahead and press the reset button to clear the form and try again). When successful, you should see the game board displayed. This will look something like the following screenshot:
On the gameboard, you have four options:
- You can play the game by clicking on the tiles in the board.
- You can disconnect from the server and try another server by pressing the "disconnect" button.
- You can reset the board to another randomly generated game by pressing the "reset" button
- You can exit the game by pressing the "exit" button.
Currently, I am not seeking any new contributions to the program.
- Isaac D. Griffith - Author, Developer, and Professor.
Currently this project is copyright 2021 Isaac D. Griffith under the MIT License. (see the LICENSE file)


