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
Binary file added Pokemon/.gitignore
Binary file not shown.
Binary file not shown.
Binary file removed Pokemon/.vs/Pokemon/v17/Browse.VC.db
Binary file not shown.
393 changes: 0 additions & 393 deletions Pokemon/.vs/Pokemon/v17/DocumentLayout.backup.json

This file was deleted.

393 changes: 0 additions & 393 deletions Pokemon/.vs/Pokemon/v17/DocumentLayout.json

This file was deleted.

Binary file removed Pokemon/.vs/Pokemon/v17/Solution.VC.db
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Pokemon/Pokemon/x64/Debug/Pokemon.exe.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\aryan\Desktop\Current Project\Pokemon\Pokemon\x64\Debug\Pokemon.exe</FullPath>
<FullPath>C:\Users\antba\source\repos\Pokemon\Pokemon\x64\Debug\Pokemon.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
Expand Down
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/CL.command.1.tlog
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/CL.read.1.tlog
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/CL.write.1.tlog
Binary file not shown.
2 changes: 1 addition & 1 deletion Pokemon/Pokemon/x64/Debug/Pokemon.tlog/Cl.items.tlog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C:\Users\aryan\Desktop\Current Project\Pokemon\Pokemon\main.cpp;C:\Users\aryan\Desktop\Current Project\Pokemon\Pokemon\Pokemon\x64\Debug\main.obj
C:\Users\antba\Source\Repos\Pokemon\Pokemon\main.cpp;C:\Users\antba\Source\Repos\Pokemon\Pokemon\Pokemon\x64\Debug\main.obj
4 changes: 2 additions & 2 deletions Pokemon/Pokemon/x64/Debug/Pokemon.tlog/Pokemon.lastbuildstate
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.41.34120:TargetPlatformVersion=10.0.22621.0:
Debug|x64|C:\Users\aryan\Desktop\Current Project\Pokemon\Pokemon\|
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0:
Debug|x64|C:\Users\antba\source\repos\Pokemon\Pokemon\|
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/link.command.1.tlog
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/link.read.1.tlog
Binary file not shown.
4 changes: 2 additions & 2 deletions Pokemon/Pokemon/x64/Debug/Pokemon.tlog/link.secondary.1.tlog
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
^C:\USERS\ARYAN\DESKTOP\CURRENT PROJECT\POKEMON\POKEMON\POKEMON\X64\DEBUG\MAIN.OBJ
C:\Users\aryan\Desktop\Current Project\Pokemon\Pokemon\Pokemon\x64\Debug\Pokemon.ilk
^C:\USERS\ANTBA\SOURCE\REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\MAIN.OBJ
C:\Users\antba\Source\Repos\Pokemon\Pokemon\Pokemon\x64\Debug\Pokemon.ilk
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/link.write.1.tlog
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/vc143.idb
Binary file not shown.
131 changes: 129 additions & 2 deletions Pokemon/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,133 @@
#include <iostream>
#include<iostream>
#include<string>
using namespace std;

// Define an enum for Pokemon choices
enum class PokemonChoice {
CHARMANDER = 1,
BULBASAUR,
SQUIRTLE,
PIKACHU // Default choice
};

// Define an enum for Pokemon types
enum class PokemonType {
FIRE,
GRASS,
WATER,
ELECTRIC
};

// Pokemon class definition
class Pokemon {
public:
// Attributes
string name;
PokemonType type;
int health;

// Created 2 constructors
Pokemon() {

}

Pokemon(string p_name, PokemonType p_type, int p_health) {
name = p_name;
type = p_type;
health = p_health;
}

// Method to simulate attacking (just for demonstration)
void attack() { std::cout << name << "attacks with a powerful move!\n"; }
};

// Player class definition
class Player {
public:
// Attributes
string name;
Pokemon chosenPokemon;

// Method to choose a Pokemon
void choosePokemon(int choice) {
switch ((PokemonChoice)choice) {
case PokemonChoice::CHARMANDER:
chosenPokemon = Pokemon("Charmander", PokemonType::FIRE, 100);
break;
case PokemonChoice::BULBASAUR:
chosenPokemon = Pokemon("Bulbasaur", PokemonType::GRASS, 100);
break;
case PokemonChoice::SQUIRTLE:
chosenPokemon = Pokemon("Squirtle", PokemonType::WATER, 100);
break;
default:
chosenPokemon = Pokemon("Pikachu", PokemonType::ELECTRIC, 100);
break;
}
cout << "Player " << name << " chose " << chosenPokemon.name << "!\n";
}
};

// ProfessorOak class definition
class ProfessorOak {
// Attributes
public:
string name;

// Method to greet the player
void greetPlayer(Player& player) {
cout << name << ": Hello there! Welcome to the world of Pokemon!\n";
cout << name << ": My name is Oak. People call me the Pokemon Professor!\n";
cout << name << ": But enough about me. Let's talk about you!\n";
}

// Method to ask the player to choose a Pokemon
void offerPokemonChoices(Player& player) {
cout << name << ": First, tell me, what�s your name?\n";
getline(cin, player.name);
cout << name << ": Ah, " << player.name << "! What a fantastic name!\n";
cout << name << ": You must be eager to start your adventure. But first, you�ll need a Pokemon of your own!\n";

// Presenting Pokemon choices
cout << name << ": I have three Pokemon here with me. They�re all quite feisty!\n";
cout << name << ": Choose wisely...\n"; cout << "1. Charmander - The fire type. A real hothead!\n";
cout << "2. Bulbasaur - The grass type. Calm and collected!\n";
cout << "3. Squirtle - The water type. Cool as a cucumber!\n";

int choice;
cout << name << ": So, which one will it be? Enter the number of your choice: ";
cin >> choice;
player.choosePokemon(choice);
}
};

int main() {

// Creating Objects of ProfessorOak, Pokemon and Player class
ProfessorOak professor;
Pokemon placeholderPokemon;
Player player;

//Assigning Values to placeholderPokemon attributes
placeholderPokemon.name = "Pikachu";
placeholderPokemon.type = PokemonType::ELECTRIC;
placeholderPokemon.health = 40;

//Assigning Values to player attributes
player.name = "Trainer";

//Assigning Values to ProfessorOak attributes
professor.name = "Professor Oak";

// Greet the player and offer Pokemon choices
professor.greetPlayer(player);
professor.offerPokemonChoices(player);

// Conclude the first chapter
cout << "Professor Oak: " << player.chosenPokemon.name << " and you, " << player.name << ", are going to be the best of friends!\n";
cout << "Professor Oak: Your journey begins now! Get ready to explore the vast world of Pokemon!\n";


return 0;
}

}