-
Notifications
You must be signed in to change notification settings - Fork 0
/
CBenefit.cpp
54 lines (39 loc) · 1.41 KB
/
CBenefit.cpp
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
54
#include <iostream>
#include "CBenefit.h"
using namespace std;
//----------------------------------------------------------------------------------------------------------------------
bool CBenefit::Move(int &x_Shift, int &y_Shift) const{
return false;
}
//----------------------------------------------------------------------------------------------------------------------
CLife::CLife(int num)
: LifeNum(num){}
bool CLife::PickedUp(){
return false;
}
void CLife::Print(int y_Pos, int x_Pos) const{
attron(COLOR_PAIR(3));
mvaddch(y_Pos, x_Pos, '+');
attroff(COLOR_PAIR(3));
}
//----------------------------------------------------------------------------------------------------------------------
CAmmo::CAmmo(int num)
: AmmoNum(num){}
bool CAmmo::PickedUp(){
return false;
}
void CAmmo::Print(int y_Pos, int x_Pos) const{
attron(COLOR_PAIR(4));
mvaddch(y_Pos, x_Pos, 'A');
attroff(COLOR_PAIR(4));
}
//----------------------------------------------------------------------------------------------------------------------
CPowerUp::CPowerUp(PowerUpType type)
: PUType(type){}
bool CPowerUp::PickedUp(){
return false;
}
void CPowerUp::Print(int y_Pos, int x_Pos) const{
mvaddch(y_Pos, x_Pos, '=');
}
//----------------------------------------------------------------------------------------------------------------------