Name | BU id | |
---|---|---|
Feifan Yuan | U61632796 | [email protected] |
Junchen Liu | U36314175 | [email protected] |
BhaskarDurgaVeeraVenkata Ganga Raju | U89625488 | [email protected] |
- download this project
- move to directory src
- run
javac *.java
to compile - run
java Main
to run the project - Note: make sure you use a Unix-based device to run this game, otherwise the colorful terminal cannot render successfully(for Windows-based machine)
- Main
- Entrance of the project
- contains main() funciton
- Game
- abstract class for all kinds of games
- GameHost
- a host of the whole game to run different games
- GameRPG
- abstract class for all kinds of RPG games
- inherits from Game
- GameLMH
- game of Legends
- inherits from GameRPG
- GameLV
- game of Legends of Valor
- inherits from GameRPG
- GamePrintUtil
- print some common things in different games
- UserInputUtil
- deal with the input from a user
- PlayMusic
- use to play the background music
- GenericCharacter
- represents characters in RPG games
- Hero
- heroes in Legends
- inherits from GenericCharacter
- HeroPaladin
- one type of hero
- inherits from Hero
- HeroSorcerer
- one type of hero
- inherits from Hero
- HeroWarrior
- one type of hero
- inherits from Hero
- HeroList
- a class used to parse hero files and print all types of heroes
- StrategyLevelUp
- an interface used to realize strategy pattern for level up strategies of different heroes
- HeroPaladinLevelUp
- Hero Paladins level up strategy
- implements StrategyLevelUp
- HeroSorcererLevelUp
- Hero Sorcerers level up strategy
- implements StrategyLevelUp
- HeroWarriorsLevelUp
- Hero Warriors level up strategy
- implements StrategyLevelUp
- Monster
- monsters in Legends
- inherits from GenericCharacter
- MonsterDragon
- one type of monster
- inherits from Monster
- MonsterExoskeleton
- one type of monster
- inherits from Monster
- MonsterSpirit
- one type of monster
- inherits from Monster
- MonsterList
- a class used to parse monster files and print all types of monsters
- Bag
- bags for each hero
- contains different types of props and money
- Prop
- props in Legends
- Weapon
- weapons in Legends
- inherits Prop
- Armor
- armors in Legends
- inherits Prop
- Potion
- potions in Legends
- inherits Prop
- Spell
- spells in Legends
- inherits Prop
- SpellFile
- one type of spell
- inherits spell
- SpellIce
- one type of spell
- inherits spell
- SpellLightning
- one type of spell
- inherits spell
- isAttackable
- if a weapon is attackable
- isCastble
- if a spell is castable
- isTradable
- if a prop is tradable
- isUsable
- if a potion is usable
- Market
- markets for all type of games
- MarketLMH
- market for Legends
- inherits from Market
- MarketPrinter
- an interface used to print props in markets
- implemented by Market
- MarketFactory
- a class used to realize simple factory pattern
- is extendable for other different types of markets
- Grid
- grids for all type of games
- GridLMH
- grid for Legends
- inherits from Grid
- GridLV
- grid for Legends of Valor
- inherits from Grid
- GridPrinter
- an interface used to print grid
- implemented by Grid
- GridFactory
- a class used to realize simple factory pattern
- is extendable for other different types of grids
- Cell
- basic cell of a grid
- CellBirth
- birth place of a player
- CellHero
- position of a player
- CellCommon
- common space in a grid
- CellInaccessible
- inaccessible space in a grid
- CellMarket
- markets in a grid
- CellHeroNexus
- nexus of heroes
- CellMonsterNexus
- nexus of monsters
- CellBush
- bushes in a grid
- CellCave
- caves in a grid
- CellPlain
- plains in a grid
- CellKoulou
- koulous in a grid
- StrategyParsing
- an interface used to realize strategy pattern
- implemented by Weapon, Armor, Potion, Spell
- ParsingFile
- like a Context class in strategy pattern
- Colors
- store some useful color to realize colorful console
-
Bonus
- Realize colorful console and use some icons to make the grid more user friendly.
- Use design patterns
- simple factory pattern (class MarketFactory and GridFactory)
- strategy pattern (class StrategyParsing and Strategy LevelUp)
- Input is getting parsed from the input files and is not hardcoded
- There is usage of other extra graphics
- We add background sound to this game
-
Things to note
In the Legends of Monsters and Heroes
- hp of heroes = level * 1000 (It is easy for a hero to be fainted in only 1 turn because of high damage of a monster)
- dodge_chance of heroes = 0.001 * agility (controlled between 0.0-1.0 which is same as monsters)
- If all the heroes are fainted, the game will automatically end.