Skip to content

Update_beside game project branch #30

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 1 commit 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 added Pokemon/main
Binary file not shown.
27 changes: 27 additions & 0 deletions Pokemon/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
#include <iostream>

using namespace std;


void castSpell(int magicLevel)
{
cout<<"Casting spell with magic level: "<<magicLevel;
}
void brewElixir(int &magicLevel)
{
magicLevel += 10;
}

void brewPotion(int magicLevel)
{
magicLevel += 50;
}
int main() {
int magicLevel = 30;
castSpell(magicLevel);

// Brew the Elixir of Wisdom and call castSpell to show effect
brewElixir(magicLevel);
castSpell(magicLevel);

// Brew the Potion of Swiftness and call castSpell to show effect
brewPotion(magicLevel);

// Final magic level after all potions
cout << "Final magic level: " << magicLevel << endl;
return 0;
}