Skip to content

Update first feature #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: Project_Setup
Choose a base branch
from
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Pokemon/.vs/Pokemon/v17/.suo
Binary file not shown.
Binary file added Pokemon/.vs/Pokemon/v17/.wsuo
Binary file not shown.
Binary file modified Pokemon/.vs/Pokemon/v17/Browse.VC.db
Binary file not shown.
374 changes: 9 additions & 365 deletions Pokemon/.vs/Pokemon/v17/DocumentLayout.backup.json

Large diffs are not rendered by default.

370 changes: 7 additions & 363 deletions Pokemon/.vs/Pokemon/v17/DocumentLayout.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions Pokemon/.vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": "No Configurations"
}
7 changes: 7 additions & 0 deletions Pokemon/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\Pokemon.sln",
"PreviewInSolutionExplorer": false
}
Binary file added Pokemon/.vs/slnx.sqlite
Binary file not shown.
5 changes: 5 additions & 0 deletions Pokemon/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"iostream": "cpp"
}
}
29 changes: 29 additions & 0 deletions Pokemon/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang++ build active file",
"command": "/usr/bin/clang++",
"args": [
"-fcolor-diagnostics",
"-fansi-escape-codes",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
Binary file added Pokemon/main
Binary file not shown.
143 changes: 143 additions & 0 deletions Pokemon/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,149 @@
#include <iostream>
#include <string.h>
using namespace std;


enum PokemonChoice {
Charmander,
Bulbasaur,
Squirtle,
InvalidChoice
};

enum class HealingItems
{
Potion,
Elixir
};

enum class BattleItems
{
Potion,
Elixir
};
int main() {
string player_name;
int player_choice;
int castle;
PokemonChoice choice = InvalidChoice;
HealingItems HealingItems = HealingItems::Potion;
BattleItems BattleItems = BattleItems::Potion;



cout<<" Trainer! Before you embark on your journey,\nthe Pokémon world needs to know who you are!";

cout<<"Time to step up and tell us your name.\nAnd remember, a great name is the start of every great adventure!"<<endl;


cout << "Enter your name: ";
cin >> player_name;
cout << "Welcome to the world of Pokemon! "<<player_name<<"I am Professor Oak.\n";
cout<<"--------\n";

cout << "You can choose one of the following Pokemon:\n";
cout << "1. Bulbasaur\n2. Charmander\n3. Squirtle\n";

cout << "Which Pokemon would you like to choose? Enter the number: ";

cin >> player_choice;

switch (player_choice)
{
case 1:
/* code */
choice = PokemonChoice::Charmander;
break;
case 2:
choice = PokemonChoice::Bulbasaur;
break;
case 3:
choice = PokemonChoice::Squirtle;
break;
default:
cout<<"Professor Oak: Hmm, that doesn't seem right. Let me choose for you… Just kidding! Let's go with Pikachu, the surprise guest!";
break;
}

switch (choice)
{
case PokemonChoice::Charmander:
cout << "Professor Oak: A fiery choice! Charmander is yours!\n";
break;
case PokemonChoice::Bulbasaur:
cout << "Professor Oak: A fine choice! Bulbasaur is always ready to grow on you!\n";
break;
case PokemonChoice::Squirtle:
cout << "Professor Oak: Splendid! Squirtle will keep you cool under pressure!\n";
break;
default:
cout << "Professor Oak: Hmm, that doesn't seem right. Let me choose for you...\n";
choice = PokemonChoice::Charmander;
cout << "Professor Oak: Just kidding! Let's go with Charmander, the fiery dragon in the making!\n";
break;
}

cout<<"--------\n";
cout<<"--------\n";
cout << "Welcome, brave adventurer!\n"
<< "You find yourself standing in front of a massive, ancient castle.\n"
<< "The walls are cracked with age,\n"
<< "and the doors creak as they slowly open in front of you.\n"
<< "Inside, there are many rooms, each more mysterious than the last.\n"
<< "Some may hold treasures beyond imagination,\n"
<< "while others may hide dangers lurking in the shadows.\n";


cout<<"--------\n";
cout<<"Enter the castle, choose your room by entering a number (1, 2, or 3): ";
cin>>castle;

switch (castle)
{
case 1:
cout<<"A room full of gold coins! You can retire now, you lucky soul!";
break;
case 2:
cout<<"A library of ancient books! You gain immense knowledge, but beware… some knowledge comes with a price.";
break;
case 3:
cout<<"A sleeping dragon! You barely escape with your life. Perhaps next time, choose more wisely...";
break;
default:
cout<<"A secret passage to the dungeon! Beware, danger lies ahead in the dark corridors.";
break;
}

cout<<"--------\n";
cout<<"--------\n";
cout << "Young Trainer!\n"
<< "You have been doing a fantastic job so far.\n"
<< "But a new challenge awaits, one that even I am struggling with in the lab!\n"
<< "Today, we are dealing with a type confusion like no other!\n";

cout<<"--------\n";
switch (HealingItems)
{
case HealingItems::Potion:
cout << "Healing Potion used! Your Pokémon recovers HP!\n";
break;
case HealingItems::Elixir:
cout << "Healing Elixir used! Your Pokémon recovers PP!\n";
break;
default:
break;
}

switch (BattleItems)
{
case BattleItems::Potion:
cout << "Battle Potion used! Your Pokémon's attack power rises!\n";
break;
case BattleItems::Elixir:
cout << "Battle Elixir used! Your Pokémon can use moves without consuming PP for a while!\n";
break;
default:
break;
}
return 0;
}
20 changes: 20 additions & 0 deletions Pokemon/main.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.main</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file added Pokemon/main.dSYM/Contents/Resources/DWARF/main
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
triple: 'x86_64-apple-darwin'
binary-path: '/Users/tommy/Documents/GitHub/Pokemon_C-/Pokemon/main'
relocations: []
...