-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScreen.h
146 lines (110 loc) · 2.84 KB
/
Screen.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#ifndef SCREEN_H
#define SCREEN_H
#include"stdafx.h"
#include"Buildings.h"
#include"Cursor.h"
#include"MainMenu.h"
namespace screen {
class IScreen {
public:
//draw
virtual void exit(); // 맵 나가기
virtual void update() = 0;
virtual void render(sf::RenderWindow* renderWindow) = 0;
};
class Screen {
private:
IScreen* iScreen;
public:
Screen();
~Screen();
void setScreen(IScreen* iScreen);
void updateScreen();
void renderScreen(sf::RenderWindow* renderWindow);
};
///////////////////////////////////////////
///////////////////////////////////////////
class MainScreen : public IScreen {
private:
std::string imgLink = "images/Background/";
std::string fileName = "MainScreen";
img::ImageFile img;
buildings::Buildings company;
buildings::Buildings stockCenter;
buildings::Buildings placeOfBusiness;
buildings::Buildings agriculture;
buildings::Buildings auctionHouse;
buildings::Buildings wholesaleShop;
buildings::Buildings hitmanContractor;
buildings::Buildings casino;
buildings::Buildings drugsShop;
public:
MainScreen();
void update() override;
void render(sf::RenderWindow* renderWindow) override;
};
///////////////////////////////////////////
///////////////////////////////////////////
class CompanyScreen : public IScreen {
private:
public:
CompanyScreen();
};
///////////////////////////////////////////
///////////////////////////////////////////
class Stock {
protected:
std::string name;
int currentPrice;
int openPrice;
int closePrice;
int highPrice;
int lowPrice;
public:
Stock();
Stock(std::string name, int current, int open, int close, int high, int low);
~Stock() {}
void setStock(std::string name, int current, int open, int close, int high, int low);
std::string getName();
int getCurrentPrice();
int getOpenPrice();
int getClosePrice();
int getHighPrice();
int getLowPrice();
};
class StockCenterScreen : public IScreen {
// 주가예측데이터
//json file 읽어올꺼 예상
private:
img::ImageFile img;
std::string imgLink = "images/Background/";
std::string fileName = "Building1";
std::list<Stock> stockList;
public:
StockCenterScreen();
~StockCenterScreen();
void addStock(Stock stock);
void deleteStock(std::string name);
//총발행량 제한 할꺼면 사용.
//void buy(std::string name, int quantity);
//void sell(std::string name, int quantity);
void exit() override;
void update() override;
void render(sf::RenderWindow* renderWindow) override;
};
class PlaceOfBusinessScreen : public IScreen {
};
class AgricultureScreen : public IScreen {
};
class AuctionHouseScreen : public IScreen {
};
class WholesaleShopScreen : public IScreen {
};
class HitmanContractorScreen : public IScreen {
};
class CasinoScreen : public IScreen {
};
class DrugsShopScreen : public IScreen {
};
}
#endif// SCREEN_H