Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ - RPG

Name: Anonymous 2010-10-29 15:44

Lets program a roleplaying game together. Each post must contain either a new function or an edited version of an old function in psudocode. I will start:

int dealDamage(int hp, int damage){
    return hp - damage;
}

Name: Anonymous 2010-10-30 20:02

>>53
No, in that case both weapons would be current. You'd have to tell the function which weapon you really mean to use, unless you suggest swapping pointers around all the time so that whichever was used last is "current" (and then handling the resulting cumbersome necessity of identifying in some other wholly contrived way of which weapon is considered primary and which is secondary).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List