A group of friends and I made d a c++ text based rpg game and we were wondering how to put it in to functions to make it easier to edit
Here is our algarithem {the code is too long}what we have but we have no idea where to start:
//The object of the game is to become strong enough and fight monstres rising through the ranks until you become strong enough and are encountered by the final boss.
//The user will be able too select through menus of what class they want to be then will be able to select between a hub worl which lets them train buy items or go to the arena.
//opponentents variables
int person, opponent, atk, asuccess, msuccess, game = 1, counter1 = 1, level = 1, atr, a, b, c = 0, d, decision, item;
// final boss stats
case 7:
attackop = 110, defenseop = 90, speedop = 80, nameop = "God";
//success rate of attacks to be calculated during battle
asuccess = speedus - defenseop + 50;
msuccess = speedus - defenseop + 50;
//amount of damage dealt based on set stats and the enemys defense
a = attackus - defenseop;
b = magicus - defenseop;
opac = 100 - defenseus;
attackop = attackop - defenseus;
//Random Number Generator for the opponents damage
int random, random2;
random = rand() % 100;
random2 = rand() % 100;