Give me comment about my battle system

Started by
0 comments, last by wah_on_2 22 years, 2 months ago
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.
Advertisement
  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