adventure code revisited
For this task I swapped code from the last post with a fellow student. I adjusted their code to appear more ‘code-like’ with functions and if statements etc. Another student made my code a little more game-like in that they added experience points and rewards for the hero. Below is the adjusted version of the code.
The Hero's Journey
//The most common template in narrative stories, if you want to become a hero in the most basic sense, run this code.
function call to adventure(){
hero(call to adventure);
//hero has a reason to adventure, usually something they care about in danger
if (refusal to call){
hero(does it anyway)
}
//hero may encounter mentor to encourage and train them to adventure despite
wishes
function trials and tribulations(){
hero(faces danger)
hero(struggles but improves)
hero(Gains experience points)
hero(Gains first weapon)
}
function death and rebirth(){
hero(faces ultimate obstacle)
hero(fails?)
hero(loses experience points)
option(start over)
hero(succeeds eventually)
reward(in hero's hands)
hero (Gains experience points)
hero(Gains a new weapon)
}
//aforementioned mentor may die and result in hero becoming more powerful.
function returnal and resurrection(){
hero(returns with reward and newfound knowledge)
hero(gains experience points and new weapons)
ending(happy)
option(replay game or end it)
}
//ending may be bittersweet