A Java game I wrote for a compsci project. Generate credits forever.
For a quick four, look at GameState.java
, buildings/machines/Machine.java
and buildings/machines/LargeMachine.java
.
-
SmallMachine
andLargeMachine
both extendMachine
.
- The
Machine
class is an abstract class extended bySmallMachine
andLargeMachine
.
- The
Upgradable
interface is implemented byLargeMachine
.
- A JSON representation of the game's state is saved to a json file of the user's choosing.
- If a save file exists, the user can choose to load it and instantiate a new
GameState
using that file.
- If a user chooses a save file that does not exist, an exception will be caught and a dialog will be shown prompting them to try again.
- If a user inputs invalid characters in their "save game" prompt, they will be asked to try again. (Technically handled by the library.)
- The
GameState.toString()
method overrides theObject.toString()
method.
- Both
Machine
child classes have overloaded constructors.
- (Optional) Cool Retro Term (https://github.com/Swordfish90/cool-retro-term)
- Maven (To build from source)
- Java 8
Download the jarfile from the Releases page, then use the java
binary (or javaw
if you're on Windows).
java -jar increment-game-VERSION.jar
mvn clean
mvn package
java -jar target/increment-game-0.0.1.jar
The source also comes with a shell script, which builds the package and launches it in a CRT emulator for fun.
dont :|