Thursday, 5 May 2011

Project 3 - Idea Development

If I go with:

while ( musicIsPlaying && music != shit) {
guy.mosh();
}

While music is playing and isn't shit, then the guy will mosh.
It seems this would work, but the while loop doesn't allow for the music to end. Everything else is locked while the while loop is being executed.
Maybe an If/Else would be more practical in this sense.

if ( musicIsPlaying && musicGenre == metal) {
guy.mosh();
}
else if (musicGenre != metal) {
guy.boo();
}
else {
guy.wait();
}

Still just a possibility at this stage.

No comments:

Post a Comment