Give me comment about my battle system
int main()
{
.............//initialize somethings
for(;
{
.........//input events handle
switch (state)
{
...........//many cases
case 7: //battle occur
battleObj.start(....);
break;
}
}
}
class CBattle()
{
..........//initialization
void start(...)
{
for(;
{
........//input events handle
if (battleFinished)
break;
}
}
}
This program showing the battle system in a role play game. I handle the user input events in the battle class, is it right? Or any better solutions? Thank you.
int main(){ .............//initialize somethings for(;;) { .........//input events handle switch (state) { ...........//many cases case 7: //battle occur battleObj.start(....); break; } }}class CBattle(){ ..........//initialization void start(...) { for(;;) { ........//input events handle if (battleFinished) break; } }}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement