diff --git a/Java-Knight/src/main/java/org/project/Main.java b/Java-Knight/src/main/java/org/project/Main.java index c2e0550..6bde20e 100644 --- a/Java-Knight/src/main/java/org/project/Main.java +++ b/Java-Knight/src/main/java/org/project/Main.java @@ -7,7 +7,7 @@ import java.util.List; public class Main { public static void main(String[] args) { - // TODO: ADD SOME LOCATIONS TO YOUR GAME + // TODO: ADD LOCATIONS TO YOUR GAME List locations = new ArrayList<>(); // TODO: IMPLEMENT GAMEPLAY diff --git a/Java-Knight/src/main/java/org/project/entity/enemies/Enemy.java b/Java-Knight/src/main/java/org/project/entity/enemies/Enemy.java index 1fcc491..e019acb 100644 --- a/Java-Knight/src/main/java/org/project/entity/enemies/Enemy.java +++ b/Java-Knight/src/main/java/org/project/entity/enemies/Enemy.java @@ -1,6 +1,6 @@ package org.project.entity.enemies; -import org.project.object.weapons.Weapon; +import org.project.item.weapons.Weapon; // TODO: UPDATE IMPLEMENTATION public abstract class Enemy { @@ -15,7 +15,6 @@ public abstract class Enemy { this.weapon = weapon; } - // TODO: (BONUS) UPDATE THE FORMULA OF TAKING DAMAGE @Override public void takeDamage(int damage) { hp -= damage; diff --git a/Java-Knight/src/main/java/org/project/entity/enemies/Skeleton.java b/Java-Knight/src/main/java/org/project/entity/enemies/Skeleton.java index 8c3e638..8a6a555 100644 --- a/Java-Knight/src/main/java/org/project/entity/enemies/Skeleton.java +++ b/Java-Knight/src/main/java/org/project/entity/enemies/Skeleton.java @@ -2,5 +2,5 @@ package org.project.entity.enemies; // TODO: UPDATE IMPLEMENTATION public class Skeleton { - // TODO: DESIGN ENEMY'S WEAPON AND ARMOR AND IMPLEMENT THE CONSTRUCTOR + // TODO: DESIGN ENEMY AND IMPLEMENT THE CONSTRUCTOR } diff --git a/Java-Knight/src/main/java/org/project/entity/players/Player.java b/Java-Knight/src/main/java/org/project/entity/players/Player.java index 674905a..ff5385c 100644 --- a/Java-Knight/src/main/java/org/project/entity/players/Player.java +++ b/Java-Knight/src/main/java/org/project/entity/players/Player.java @@ -1,8 +1,8 @@ package org.project.entity.players; import org.project.entity.Entity; -import org.project.object.armors.Armor; -import org.project.object.weapons.Weapon; +import org.project.item.armors.Armor; +import org.project.item.weapons.Weapon; // TODO: UPDATE IMPLEMENTATION public abstract class Player { @@ -30,10 +30,10 @@ public abstract class Player { @Override public void defend() { - // TODO: (BONUS) IMPLEMENT A DEFENSE METHOD FOR SHIELDS + // TODO } - // TODO: (BONUS) UPDATE THE FORMULA OF TAKING DAMAGE + @Override public void takeDamage(int damage) { hp -= damage - armor.getDefense(); diff --git a/Java-Knight/src/main/java/org/project/object/Object.java b/Java-Knight/src/main/java/org/project/item/Object.java similarity index 84% rename from Java-Knight/src/main/java/org/project/object/Object.java rename to Java-Knight/src/main/java/org/project/item/Object.java index 922cbd5..b13c8d5 100644 --- a/Java-Knight/src/main/java/org/project/object/Object.java +++ b/Java-Knight/src/main/java/org/project/item/Object.java @@ -1,4 +1,4 @@ -package org.project.object; +package org.project.item; import org.project.entity.Entity; diff --git a/Java-Knight/src/main/java/org/project/object/armors/Armor.java b/Java-Knight/src/main/java/org/project/item/armors/Armor.java similarity index 95% rename from Java-Knight/src/main/java/org/project/object/armors/Armor.java rename to Java-Knight/src/main/java/org/project/item/armors/Armor.java index 346c25e..7ca8774 100644 --- a/Java-Knight/src/main/java/org/project/object/armors/Armor.java +++ b/Java-Knight/src/main/java/org/project/item/armors/Armor.java @@ -1,4 +1,4 @@ -package org.project.object.armors; +package org.project.item.armors; // TODO: UPDATE IMPLEMENTATION public abstract class Armor { diff --git a/Java-Knight/src/main/java/org/project/object/armors/KnightArmor.java b/Java-Knight/src/main/java/org/project/item/armors/KnightArmor.java similarity index 78% rename from Java-Knight/src/main/java/org/project/object/armors/KnightArmor.java rename to Java-Knight/src/main/java/org/project/item/armors/KnightArmor.java index 0dedcc2..eb59a46 100644 --- a/Java-Knight/src/main/java/org/project/object/armors/KnightArmor.java +++ b/Java-Knight/src/main/java/org/project/item/armors/KnightArmor.java @@ -1,4 +1,4 @@ -package org.project.object.armors; +package org.project.item.armors; // TODO: UPDATE IMPLEMENTATION public class KnightArmor { diff --git a/Java-Knight/src/main/java/org/project/object/consumables/Consumable.java b/Java-Knight/src/main/java/org/project/item/consumables/Consumable.java similarity index 76% rename from Java-Knight/src/main/java/org/project/object/consumables/Consumable.java rename to Java-Knight/src/main/java/org/project/item/consumables/Consumable.java index fd8962c..028e13d 100644 --- a/Java-Knight/src/main/java/org/project/object/consumables/Consumable.java +++ b/Java-Knight/src/main/java/org/project/item/consumables/Consumable.java @@ -1,4 +1,4 @@ -package org.project.object.consumables; +package org.project.item.consumables; // TODO: UPDATE IMPLEMENTATION public abstract class Consumable { diff --git a/Java-Knight/src/main/java/org/project/object/consumables/Flask.java b/Java-Knight/src/main/java/org/project/item/consumables/Flask.java similarity index 76% rename from Java-Knight/src/main/java/org/project/object/consumables/Flask.java rename to Java-Knight/src/main/java/org/project/item/consumables/Flask.java index d7e515d..c0e7a6d 100644 --- a/Java-Knight/src/main/java/org/project/object/consumables/Flask.java +++ b/Java-Knight/src/main/java/org/project/item/consumables/Flask.java @@ -1,4 +1,4 @@ -package org.project.object.consumables; +package org.project.item.consumables; import org.project.entity.Entity; @@ -8,7 +8,7 @@ public class Flask { THIS IS AN EXAMPLE OF A CONSUMABLE DESIGN. */ - // TODO: (BONUS) UPDATE USE METHOD + // TODO: UPDATE USE METHOD @Override public void use(Entity target) { target.heal(target.getMaxHP() / 10); diff --git a/Java-Knight/src/main/java/org/project/object/weapons/Sword.java b/Java-Knight/src/main/java/org/project/item/weapons/Sword.java similarity index 93% rename from Java-Knight/src/main/java/org/project/object/weapons/Sword.java rename to Java-Knight/src/main/java/org/project/item/weapons/Sword.java index a0e3cc3..96226ee 100644 --- a/Java-Knight/src/main/java/org/project/object/weapons/Sword.java +++ b/Java-Knight/src/main/java/org/project/item/weapons/Sword.java @@ -1,4 +1,4 @@ -package org.project.object.weapons; +package org.project.item.weapons; import org.project.entity.Entity; diff --git a/Java-Knight/src/main/java/org/project/object/weapons/Weapon.java b/Java-Knight/src/main/java/org/project/item/weapons/Weapon.java similarity index 94% rename from Java-Knight/src/main/java/org/project/object/weapons/Weapon.java rename to Java-Knight/src/main/java/org/project/item/weapons/Weapon.java index 35e1ecc..cb9fcf2 100644 --- a/Java-Knight/src/main/java/org/project/object/weapons/Weapon.java +++ b/Java-Knight/src/main/java/org/project/item/weapons/Weapon.java @@ -1,4 +1,4 @@ -package org.project.object.weapons; +package org.project.item.weapons; import org.project.entity.Entity; diff --git a/Java-Knight/src/main/java/org/project/location/Location.java b/Java-Knight/src/main/java/org/project/location/Location.java index dfa9cb8..b0b4b98 100644 --- a/Java-Knight/src/main/java/org/project/location/Location.java +++ b/Java-Knight/src/main/java/org/project/location/Location.java @@ -14,10 +14,6 @@ public class Location { this.enemies = enemies; } - /* - TODO: (BONUS) RESET EACH LOCATION AFTER PLAYER LEAVES - */ - public String getName() { return name; } diff --git a/README.md b/README.md index 290e832..6ce2a67 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A turn-based RPG with Roguelike elements which can be run in the terminal. ### **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**. -⚠️ **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!** @@ -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. -- **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`. - **Base Stat Differences:** Each class must have distinct starting stats. For example: - **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. - **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. -- **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 - 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):** 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. 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. @@ -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. ✅ **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. -✅ **(Bonus) PvP Mode:** Implement a **Player vs. Player** combat system. +✅ **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. +✅ **PvP Mode:** Implement a **Player vs. Player** combat system. ### 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: @@ -150,15 +150,16 @@ As the final mandatory step of your development, you must replace the default `R ## Evaluation Criteria ⚖ -| **Criteria** | **Points** | -|------------------------|------------| -| **Strict application of all OOP principles (Mandatory)** | **40** | -| Correct class hierarchy, Base stats & standard 5-action system | **20** | -| Working combat mechanics, Leveling System & Enemy abilities | **20** | -| Game Loop (3 Choices, Scaling XP & RNG Keys) | **10** | -| Meaningful, interactive, & colored console outputs | **10** | -| Clear and Comprehensive `README.md` | **10** | -| **Total Score** | **110** | +| **Criteria** | **Points** | +|-------------------------------------------------------------|------------| +| Proper use of OOP principles | **50** | +| Working combat mechanics, Leveling System & Enemy abilities | **20** | +| Clear and Comprehensive `README.md` | **20** | +| Code readability, documentation, and comments | **10** | +| Meaningful, interactive, & colored console outputs | **10** | +| Inventory (item) and Merchant System (bonus) | **20** | +| Other Extra features (bonus tasks) | **20** | +| **Total Score** | **150** | ## 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. @@ -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. ## 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. ![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. \ No newline at end of file +###### - Born of God and Void. You shall seal the blinding light that plagues their dreams. You are the Vessel. You are the Java Knight. \ No newline at end of file diff --git a/Readme_Pictures/structure.png b/Readme_Pictures/structure.png index 3b53890..1f193f9 100644 Binary files a/Readme_Pictures/structure.png and b/Readme_Pictures/structure.png differ