Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void add_attack(void* state, void* element, int index) {
- double* a = (double*)state;
- Fighter* f = (Fighter*) element;
- Wizard* w = (Wizard*) element;
- if(f->class->defense(f) == 0.8)
- {
- a += f->class->attack(f);
- }
- else
- {
- a += w->class->attack(w);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement