Programming workshop with OOP and TTRPG
git clone
npm i
npm start
OOP-RPG is a unit test disguised as a very quick text game that pits four heroes against BOSS DRAGON. The heroes start with an item, discover another in a chest, and are then sent to do battle with BOSS DRAGON. BOSS DRAGON has 100 hit points, while each hero has only 5.
OOP-RPG's main game loop works, but it's missing exciting content. You are tasked with programming interesting items and weapons, and with refactoring and implementing logic in the character classes.
You are only allowed to modify files inside the workshop folder.
Create one or more item classes and assign instances to the variables WarriorStartItem
, ClericStartItem
, etc. Use the item interfaces to make these items useful in the fight against BOSS DRAGON.
Create one or more item classes and assign instances to the function GetItemsInTreasureChests
. Use the item interfaces to make these items useful in the fight against BOSS DRAGON.
- Refactor the classes in
Characters.tsx
for maximum code reuse. MakeCharacters.tsx
as short and as clean as possible! - Customize the
chooseAction
function of the character classes to maximize their effectiveness in combat against BOSS DRAGON. - Bonus: Customize the
getASCIIStatus
function to return a unique character per class and 'X' when dead
The test is complete when your useful weapon, item, and character classes result in a combat VICTORY against the dastardly BOSS DRAGON.
Create a branch and a Pull Request to submit your code, and take a screenshot or video of your VICTORY test run.
All submissions should be original code written by you; no copy-paste, please.
Show us the PRETTIEST UI and win a cash prize! Submit a secondary PR with gorgeous graphics or UX and you may win a $35 gift card!
- Again, your code and graphics should be 100% original
- This UI PR may change any code in the repo in service of beauty