mchack: I bought it.
only caught that it wasn't you because you talked yourself down like that.
"!= true" reads as "not true", no?
hmm, what would be the right syntax ... maybe "if x NOT true" ... or "if x false".
anyway it's c pseudo code isn't it? I have no Idea how you'd actually write it down, but I feel like I completely understood how bookwyrms code should run, so mission accomplished for pseudocode, right? :)
Eh, he kind of has a point. That was really, really lazy pseudo code on my part, though it seems to have accomplished its objective.
A better formatted example would look more like this:
if(!shotTaken) {
Shoot();
} else {
AskOthersToShoot();
}
-The variable was obviously a boolean, so just use the 'not' on it directly in the if statement.
-Convention says method names generally should start with a capital. Variables start with a lower case.
-In my defense, I did indeed try to format it better, but the forum ate my white space.
mchack: edit:
on the other hand, it just runs through once. that's bad. you need a counter for the shots fired so you can shoot again as soon as it's reloaded. and a while loop or something so your code doesn't exit...
Too much work for little return. The loop is implied. :)
The loop would probably be something like
while(gameActive) {
...
}