Update Readme and base structure.

This commit is contained in:
2026-05-01 20:32:12 +03:30
parent b183bda7b4
commit 70922d6774
14 changed files with 33 additions and 37 deletions
@@ -7,7 +7,7 @@ import java.util.List;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
// TODO: ADD SOME LOCATIONS TO YOUR GAME // TODO: ADD LOCATIONS TO YOUR GAME
List<Location> locations = new ArrayList<>(); List<Location> locations = new ArrayList<>();
// TODO: IMPLEMENT GAMEPLAY // TODO: IMPLEMENT GAMEPLAY
@@ -1,6 +1,6 @@
package org.project.entity.enemies; package org.project.entity.enemies;
import org.project.object.weapons.Weapon; import org.project.item.weapons.Weapon;
// TODO: UPDATE IMPLEMENTATION // TODO: UPDATE IMPLEMENTATION
public abstract class Enemy { public abstract class Enemy {
@@ -15,7 +15,6 @@ public abstract class Enemy {
this.weapon = weapon; this.weapon = weapon;
} }
// TODO: (BONUS) UPDATE THE FORMULA OF TAKING DAMAGE
@Override @Override
public void takeDamage(int damage) { public void takeDamage(int damage) {
hp -= damage; hp -= damage;
@@ -2,5 +2,5 @@ package org.project.entity.enemies;
// TODO: UPDATE IMPLEMENTATION // TODO: UPDATE IMPLEMENTATION
public class Skeleton { public class Skeleton {
// TODO: DESIGN ENEMY'S WEAPON AND ARMOR AND IMPLEMENT THE CONSTRUCTOR // TODO: DESIGN ENEMY AND IMPLEMENT THE CONSTRUCTOR
} }
@@ -1,8 +1,8 @@
package org.project.entity.players; package org.project.entity.players;
import org.project.entity.Entity; import org.project.entity.Entity;
import org.project.object.armors.Armor; import org.project.item.armors.Armor;
import org.project.object.weapons.Weapon; import org.project.item.weapons.Weapon;
// TODO: UPDATE IMPLEMENTATION // TODO: UPDATE IMPLEMENTATION
public abstract class Player { public abstract class Player {
@@ -30,10 +30,10 @@ public abstract class Player {
@Override @Override
public void defend() { public void defend() {
// TODO: (BONUS) IMPLEMENT A DEFENSE METHOD FOR SHIELDS // TODO
} }
// TODO: (BONUS) UPDATE THE FORMULA OF TAKING DAMAGE
@Override @Override
public void takeDamage(int damage) { public void takeDamage(int damage) {
hp -= damage - armor.getDefense(); hp -= damage - armor.getDefense();
@@ -1,4 +1,4 @@
package org.project.object; package org.project.item;
import org.project.entity.Entity; import org.project.entity.Entity;
@@ -1,4 +1,4 @@
package org.project.object.armors; package org.project.item.armors;
// TODO: UPDATE IMPLEMENTATION // TODO: UPDATE IMPLEMENTATION
public abstract class Armor { public abstract class Armor {
@@ -1,4 +1,4 @@
package org.project.object.armors; package org.project.item.armors;
// TODO: UPDATE IMPLEMENTATION // TODO: UPDATE IMPLEMENTATION
public class KnightArmor { public class KnightArmor {
@@ -1,4 +1,4 @@
package org.project.object.consumables; package org.project.item.consumables;
// TODO: UPDATE IMPLEMENTATION // TODO: UPDATE IMPLEMENTATION
public abstract class Consumable { public abstract class Consumable {
@@ -1,4 +1,4 @@
package org.project.object.consumables; package org.project.item.consumables;
import org.project.entity.Entity; import org.project.entity.Entity;
@@ -8,7 +8,7 @@ public class Flask {
THIS IS AN EXAMPLE OF A CONSUMABLE DESIGN. THIS IS AN EXAMPLE OF A CONSUMABLE DESIGN.
*/ */
// TODO: (BONUS) UPDATE USE METHOD // TODO: UPDATE USE METHOD
@Override @Override
public void use(Entity target) { public void use(Entity target) {
target.heal(target.getMaxHP() / 10); target.heal(target.getMaxHP() / 10);
@@ -1,4 +1,4 @@
package org.project.object.weapons; package org.project.item.weapons;
import org.project.entity.Entity; import org.project.entity.Entity;
@@ -1,4 +1,4 @@
package org.project.object.weapons; package org.project.item.weapons;
import org.project.entity.Entity; import org.project.entity.Entity;
@@ -14,10 +14,6 @@ public class Location {
this.enemies = enemies; this.enemies = enemies;
} }
/*
TODO: (BONUS) RESET EACH LOCATION AFTER PLAYER LEAVES
*/
public String getName() { public String getName() {
return name; return name;
} }
+18 -17
View File
@@ -7,7 +7,7 @@ A turn-based RPG with Roguelike elements which can be run in the terminal.
### **Introduction** ### **Introduction**
Welcome to **Java knight**, a turn-based RPG inspired by Roguelike games! In this assignment, you will develop a **text-based role-playing game (RPG)**. This project is designed to rigorously test your understanding of **Object-Oriented Programming (OOP) principles**. Welcome to **Java knight**, a turn-based RPG inspired by Roguelike games! In this assignment, you will develop a **text-based role-playing game (RPG)**. This project is designed to rigorously test your understanding of **Object-Oriented Programming (OOP) principles**.
⚠️ **MANDATORY REQUIREMENT:** You **must** utilize all the OOP concepts you have learned so far—including *Inheritance, Interfaces, Abstract Classes, Encapsulation, Polymorphism, Overloading, and Overriding*. It is extremely important that you use everything in its right place. Your design and architecture will be heavily graded based on how well you apply these principles to avoid code duplication and maintain a clean structure. ⚠️ **REQUIREMENT:** You **must** utilize all the OOP concepts you have learned so far—including *Inheritance, Interfaces, Abstract Classes, Encapsulation, Polymorphism, Overloading, and Overriding*. It is extremely important that you use everything in its right place. Your design and architecture will be graded based on how well you apply these principles to avoid code duplication and maintain a clean structure.
🎯 **Your goal is not just to complete the assignment but to learn and apply OOP effectively!** 🎯 **Your goal is not just to complete the assignment but to learn and apply OOP effectively!**
@@ -39,7 +39,7 @@ git checkout -b develop
A well-structured OOP hierarchy is crucial. Avoid duplicating code by placing shared logic in abstract classes. A well-structured OOP hierarchy is crucial. Avoid duplicating code by placing shared logic in abstract classes.
- **Entities & Locations:** You have `Entity`, `Object`(Bonus) , and `Location`. - **Entities & Locations:** You have `Entity`, `Item`(Bonus) , and `Location`.
- **Players:** `Player` is an abstract class implementing `Entity`. Subclasses: `Wizard`, `Knight`, `Assassin`. - **Players:** `Player` is an abstract class implementing `Entity`. Subclasses: `Wizard`, `Knight`, `Assassin`.
- **Base Stat Differences:** Each class must have distinct starting stats. For example: - **Base Stat Differences:** Each class must have distinct starting stats. For example:
- **Knight:** Highest Base Damage. - **Knight:** Highest Base Damage.
@@ -47,7 +47,7 @@ A well-structured OOP hierarchy is crucial. Avoid duplicating code by placing sh
- **Assassin:** Highest Max Stamina/Mana. - **Assassin:** Highest Max Stamina/Mana.
- **Enemies:** `Enemy` is an abstract class implementing `Entity`. Subclasses: `Skeleton`, `Goblin`, `Vampire`, and **`Dragon`**. - **Enemies:** `Enemy` is an abstract class implementing `Entity`. Subclasses: `Skeleton`, `Goblin`, `Vampire`, and **`Dragon`**.
- **The Boss:** Even though `Dragon` is the final boss, it **must** be a subclass of `Enemy` to inherit common combat properties, while possessing extremely high stats and unique mechanics. - **The Boss:** Even though `Dragon` is the final boss, it **must** be a subclass of `Enemy` to inherit common combat properties, while possessing extremely high stats and unique mechanics.
- **Objects (Bonus):** `Consumable`, `Armor`, `Weapon` are abstract classes implementing `Object`. example : - **Item (Bonus):** `Consumable`, `Armor`, `Weapon` are abstract classes implementing `Item`. example :
- KnightArmor extends Armor - you can add more subclasses of Armor for extra score - KnightArmor extends Armor - you can add more subclasses of Armor for extra score
- Sword extends Weapon - you can add more subclasses of Weapon for extra score - Sword extends Weapon - you can add more subclasses of Weapon for extra score
@@ -57,7 +57,7 @@ A well-structured OOP hierarchy is crucial. Avoid duplicating code by placing sh
**Player Actions (The Rule of Five):** **Player Actions (The Rule of Five):**
Every player class **must** implement exactly the following 5 actions (You can use an interface like `ICombatActions`). Every action (except Light Attack) consumes a specific amount of Mana/Stamina. The **Special Ability** must consume the *highest* amount of Mana compared to the others. Every player class **must** implement exactly the following 5 actions (You can use an interface like `ICombatActions`). Every action (except Light Attack) consumes a specific amount of Mana/Stamina. The **Special Ability** must consume the *highest* amount of Mana compared to the others.
1. **Light Attack:** Deals moderate damage and costs **NO Mana**. *Note: If the player runs out of Mana/Stamina, this is the ONLY action they can perform.* 1. **Light Attack:** Deals moderate damage and costs **NO Mana**. (Note: If the player runs out of Mana/Stamina, this is the ONLY action they can perform.)
2. **Heavy Attack:** Deals high damage, medium Mana cost. 2. **Heavy Attack:** Deals high damage, medium Mana cost.
3. **Defend:** Completely blocks or significantly reduces the damage of the enemy's *next* strike. Medium Mana cost. 3. **Defend:** Completely blocks or significantly reduces the damage of the enemy's *next* strike. Medium Mana cost.
4. **Heal:** Restores a portion of the player's HP. Medium-high Mana cost. 4. **Heal:** Restores a portion of the player's HP. Medium-high Mana cost.
@@ -136,8 +136,8 @@ while (player.isAlive() && enemy.isAlive())
**Dynamic Economy & Merchant System:** Implement coins that drop from enemies. Add a "Visit Merchant" option to the main loop where players can spend coins to buy specific weapons, armors, or potions. **Dynamic Economy & Merchant System:** Implement coins that drop from enemies. Add a "Visit Merchant" option to the main loop where players can spend coins to buy specific weapons, armors, or potions.
**Multiple Weapons & Inventory:** Players can buy, store, and swap between multiple weapons mid-combat. **Multiple Weapons & Inventory:** Players can buy, store, and swap between multiple weapons mid-combat.
**Multiplayer/Party Mode:** Allow multiple players to team up. The Dragon's breath attack will damage the entire party simultaneously. **Multiplayer/Party Mode:** Allow multiple players to team up and fight multiple enemies together. The Dragon's breath attack will damage the entire party simultaneously.
**(Bonus) PvP Mode:** Implement a **Player vs. Player** combat system. **PvP Mode:** Implement a **Player vs. Player** combat system.
### 6️⃣ Step 6: Write a Comprehensive README 📄 ### 6️⃣ Step 6: Write a Comprehensive README 📄
As the final mandatory step of your development, you must replace the default `README.md` with your own comprehensive documentation. Your README should include: As the final mandatory step of your development, you must replace the default `README.md` with your own comprehensive documentation. Your README should include:
@@ -150,15 +150,16 @@ As the final mandatory step of your development, you must replace the default `R
## Evaluation Criteria ⚖ ## Evaluation Criteria ⚖
| **Criteria** | **Points** | | **Criteria** | **Points** |
|------------------------|------------| |-------------------------------------------------------------|------------|
| **Strict application of all OOP principles (Mandatory)** | **40** | | Proper use of OOP principles | **50** |
| Correct class hierarchy, Base stats & standard 5-action system | **20** | | Working combat mechanics, Leveling System & Enemy abilities | **20** |
| Working combat mechanics, Leveling System & Enemy abilities | **20** | | Clear and Comprehensive `README.md` | **20** |
| Game Loop (3 Choices, Scaling XP & RNG Keys) | **10** | | Code readability, documentation, and comments | **10** |
| Meaningful, interactive, & colored console outputs | **10** | | Meaningful, interactive, & colored console outputs | **10** |
| Clear and Comprehensive `README.md` | **10** | | Inventory (item) and Merchant System (bonus) | **20** |
| **Total Score** | **110** | | Other Extra features (bonus tasks) | **20** |
| **Total Score** | **150** |
## Tips 🚀 ## Tips 🚀
- **Follow OOP principles**: Avoid redundant code by using inheritance properly. Think carefully about what belongs in an abstract class vs. a specific subclass. Make sure you use overriding and overloading correctly. - **Follow OOP principles**: Avoid redundant code by using inheritance properly. Think carefully about what belongs in an abstract class vs. a specific subclass. Make sure you use overriding and overloading correctly.
@@ -166,8 +167,8 @@ As the final mandatory step of your development, you must replace the default `R
- **Ask for help**: If you're stuck, reach out to your classmates or mentors. - **Ask for help**: If you're stuck, reach out to your classmates or mentors.
## Submission ⌛ ## Submission ⌛
- **Deadline**: Submit your assignment before **May 9th, 2026**. - **Deadline**: Submit your assignment before **21 Ordibehesht (May 11th, 2026)**.
- **Submission Format**: Push your code to your forked repository, create a PR, and ensure your comprehensive `README.md` is included in the root directory. - **Submission Format**: Push your code to your forked repository, create a PR, and ensure your comprehensive `README.md` is included in the root directory.
![cover](Readme_Pictures/image.png) ![cover](Readme_Pictures/image.png)
###### Born of God and Void. You shall seal the blinding light that plagues their dreams. You are the Vessel. You are the Java Knight. ###### - Born of God and Void. You shall seal the blinding light that plagues their dreams. You are the Vessel. You are the Java Knight.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 67 KiB