-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboom_flag.h
53 lines (33 loc) · 820 Bytes
/
boom_flag.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef __BOOM_FLAG_H__
#define __BOOM_FLAG_H__
#include "piece.h"
class flag : public piece
{
public:
flag(int team, image * h, image * r);
/* -method */
/* name: attack */
/* desc: returns nothing - flags don't attack */
/* params: piece * enemy */
/* return: int */
/* 1) return -2 */
int attack(piece * enemy) { return -2; }
/* name: is_flag */
/* return true */
int is_flag() { return 1; }
};
class bomb : public piece
{
public:
bomb(int team, image * h, image * r);
/* name: is_bomb */
/* return true */
int is_bomb() { return 1; }
/* name: attack */
/* desc: returns false */
/* params: piece * enemy */
/* return: int */
/* 1) return -2 */
int attack(piece * enemy) { return -2; }
};
#endif