diff --git a/DunGen.pptx b/DunGen.pptx index a88d1799800051a95bbba900b371984cf7fda441..ba1a697a90c7f79997077faa42804aa228bacbf4 100644 Binary files a/DunGen.pptx and b/DunGen.pptx differ diff --git a/main.cpp b/main.cpp index 151d42648239a2f96aef75d87b29295d238ddce0..9adac30a099f9e77839b97cda33f533e9ee0e242 100644 --- a/main.cpp +++ b/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "Player.h" #include "Boss.h" #include "Monster.h" @@ -12,7 +13,7 @@ using namespace std; void introMenu(); -void ingameMenu(Inventory); +void ingameMenu(Inventory, Player); int main() { @@ -25,9 +26,9 @@ int main() { bool playerVictory = false; string name; - int seed; - cout << "Enter a seed: "; - cin >> seed; + srand(time(NULL)); + + int seed = rand() % 650 + 1; introMenu(); @@ -39,7 +40,7 @@ int main() { playerPtr->setStats(seed); inventoryPtr->gainItem("Sword", 0, 0); cout << "Player has been made" << endl; - ingameMenu(*inventoryPtr); + ingameMenu(*inventoryPtr, *playerPtr); do { //floor 1-3 @@ -50,6 +51,7 @@ int main() { dungeonPtr->roomEncounter = dungeonPtr->rollRoom(); if(dungeonPtr->roomCounter % 5 == 0) { + cout << endl; cout << "You enter the room" << endl; dungeonPtr->getBoss(dungeonPtr->floorNum); @@ -86,6 +88,7 @@ int main() { dungeonPtr->roomCounter++; } else { + cout << endl; cout << "You enter the room" << endl; dungeonPtr->getMonster(dungeonPtr->roomEncounter); do { @@ -125,6 +128,7 @@ int main() { //floor 4 + cout << endl; cout << "You enter the room" << endl; dungeonPtr->getBoss(dungeonPtr->floorNum); do { @@ -161,7 +165,7 @@ int main() { cout << "You win!" << endl; cout << "Final Inventory" << endl; - ingameMenu(*inventoryPtr); + ingameMenu(*inventoryPtr, *playerPtr); delete monsterPtr; delete bossPtr; @@ -177,9 +181,10 @@ void introMenu() { << " so good luck fighting, talking or fleeing like a little baby!" << endl; } -void ingameMenu(Inventory inventory) { +void ingameMenu(Inventory inventory, Player player) { cout << "--------------------------------" << endl; - cout << "Inventory" << endl;; + cout << "Inventory" << endl; + cout << "Player health: " << player.health << endl; inventory.listInventory(); cout << "--------------------------------" << endl; } \ No newline at end of file