This is a basic role playing game (RPG) developed in java. The intent of this project is to use the best practice in java application development.
In this RPG first you choose a character. It will always show the description of the place you current are and the actions you can make which can be either search for items or go to another place.
You might face some enemies to fight with and you need to beat them to proceed to you jorney. The main objective is to survive and go to a safe place.
./gradlew build
./gradlew run
./gradlew test
- See report on build/reports/tests/test/index.html
It holds the data for the current game. Singleton class accessed by the whole code.
It holds the state of the game with the text to be shown and the available options
Interface of the player character. Create character using CharacterFactory pattern
Have the code for save and resume the game in a local file. The local file is the Context object serialized
- Add test for all classes
- Implement state graph
- Use experience to build level progression
- Fix bugs
- Improve the battle feature using diferent java classes
#Flaws
- Gradle build failure. Environment issue.
- Some props. modifiers
- Context is too open and can be changed by components that shouldn't do it
- No Exception handling or Recovery strategy
- Solution is not easy to extend
- Extend oppon configuration?
#Improvements
- Put the name of the saved file (persistence) in a properties file
- !Create an abstraction for persistence classes!
- Handle exceptions and recovery procedures
- Make Context changeble only in Game.class
- Makea graph structure for states connecting related states
- Make properties files to specify what dependencies to use (persistence, )
- Actions should not change Context props