Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // THIS
- int id = 0;
- Skill* skill = tryAttack1(&id) || tryAttack2(&id);
- if(id == 1)
- {
- }
- else if(id == 2)
- {
- }
- // OR THIS
- do
- {
- Skill* skill;
- skill = tryAttack1();
- if(skill)
- {
- // ...
- break;
- }
- skill = tryAttack2();
- if(skill)
- {
- // ...
- break;
- }
- } while(0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement