Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions Pokemon/BattleManager.cpp

This file was deleted.

92 changes: 0 additions & 92 deletions Pokemon/Game.cpp

This file was deleted.

16 changes: 0 additions & 16 deletions Pokemon/Game.hpp

This file was deleted.

12 changes: 0 additions & 12 deletions Pokemon/Grass.hpp

This file was deleted.

24 changes: 24 additions & 0 deletions Pokemon/Header/Battle/BattleManager.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#pragma once
#include"../../Header/Battle/BattleState.hpp"
#include"../../Header/Pokemon/Pokemon.hpp"
#include"../../Header/Character/Player/Player.hpp"

using namespace N_Character;
using namespace N_Player;

namespace N_Battle
{


class BattleManager {
public:
void startBattle(Player& player, N_Pokemon::Pokemon& wildPokemon);
private:
BattleState battleState;

void battle();
void handleBattleOutcome();
void updateBattleState();
};
}

13 changes: 13 additions & 0 deletions Pokemon/Header/Battle/BattleState.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once
#include"../../Header/Pokemon/Pokemon.hpp"


namespace N_Battle
{
struct BattleState {
N_Pokemon::Pokemon* playerPokemon;
N_Pokemon::Pokemon* wildPokemon;
bool playerTurn;
bool battleOngoing;
};
}
18 changes: 18 additions & 0 deletions Pokemon/Header/Battle/WildEncounterManager.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once
#include <vector>
#include"../Pokemon/Pokemon.hpp"
#include"../Pokemon/Grass.hpp"

//class Pokemon;
//struct Grass;

using namespace N_Pokemon;

namespace N_Battle
{
class WildEncounterManager {
public:
WildEncounterManager();
Pokemon getRandomPokemonFromGrass(const Grass& grass);
};
}
29 changes: 29 additions & 0 deletions Pokemon/Header/Character/Player/Player.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once
#include<iostream>
#include<string>
#include"../../../Header/Pokemon/PokemonType.hpp"
#include"../../../Header/Pokemon/PokemonChoice.hpp"
#include"../../../Header/Pokemon/Pokemon.hpp"
#include"../../../Header/Utility/Utility.hpp"
using namespace std;

namespace N_Character
{
namespace N_Player
{
class Player {
public:
string name;
N_Pokemon::Pokemon chosenPokemon;

// Default constructor
Player();

// Parameterized constructor
Player(string p_name, N_Pokemon::Pokemon p_chosenPokemon);


void choosePokemon(int choice);
};
}
}
27 changes: 27 additions & 0 deletions Pokemon/Header/Character/ProfessorOak.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once
#include <iostream>
#include <limits> // Include this header to use numeric_limits
#include <string>
#include"../../Header/Utility/Utility.hpp"
#include"../../Header/Character/Player/Player.hpp"
using namespace std;

namespace N_Character
{
using namespace N_Player;

class ProfessorOak {
public:
string name;

// Parameterized constructor
ProfessorOak(string p_name);

void greetPlayer(Player& player);

void offerPokemonChoices(Player& player);

// New method for the main quest conversation
void explainMainQuest(Player& player);
};
}
22 changes: 22 additions & 0 deletions Pokemon/Header/Main/Game.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once
#include "../Pokemon/Grass.hpp"
#include"../Character/Player/Player.hpp"

using namespace N_Character;
using namespace N_Player;
using namespace N_Pokemon;

namespace N_Game
{
class Game {

public:
Game();
void gameLoop(Player& player);

private:
Grass forestGrass;
Grass caveGrass;
Grass shallowWater;
};
}
14 changes: 14 additions & 0 deletions Pokemon/Header/Pokemon/Grass.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once
#include<string>
#include<vector>
#include"../../Header/Pokemon/Pokemon.hpp"
using namespace std;

namespace N_Pokemon
{
struct Grass {
string environmentType;
vector<Pokemon> wildPokemonList;
int encounterRate;
};
}
38 changes: 38 additions & 0 deletions Pokemon/Header/Pokemon/Pokemon.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#pragma once
#include <iostream>
#include <limits>
#include <string>
#include"../../Header/Pokemon/PokemonType.hpp"
#include"../../Header/Pokemon/PokemonChoice.hpp"
using namespace std;

namespace N_Pokemon
{
class Pokemon {
public:
string name;
PokemonType type;
int health;
int maxHealth;
int attackPower;

// Default constructor
Pokemon();

// Parameterized constructor
Pokemon(std::string p_name, PokemonType p_type, int p_health, int p_attackPower);

// Copy constructor
Pokemon(const Pokemon& other);

~Pokemon();

void attack(Pokemon& target);

void heal();

void takeDamage(int damage);

bool isFainted() const;
};
}
10 changes: 10 additions & 0 deletions Pokemon/Header/Pokemon/PokemonChoice.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once
namespace N_Pokemon
{
enum class PokemonChoice {
CHARMANDER = 1,
BULBASAUR,
SQUIRTLE,
PIKACHU // Default choice
};
}
14 changes: 14 additions & 0 deletions Pokemon/Header/Pokemon/PokemonType.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once
namespace N_Pokemon
{
enum class PokemonType {
FIRE,
GRASS,
WATER,
ELECTRIC,
POISON,
BUG,
ROCK,
NORMAL // Added for the default constructor
};
}
10 changes: 10 additions & 0 deletions Pokemon/Header/Utility/Utility.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once
namespace N_Utility
{
class Utility {
public:
static void clearConsole();
static void waitForEnter();
static void clearInputBuffer(); // New helper function
};
}
Loading