-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrobot.cpp
More file actions
77 lines (60 loc) · 1.2 KB
/
robot.cpp
File metadata and controls
77 lines (60 loc) · 1.2 KB
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
//
// robot.c
// kirillyat
// CMC MSU 2020
//
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <limits.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
class Player {
int number;
int money;
int raw;
int factory;
int product;
public:
Player(int N, int M, int R, int F, int P);
void PrintStat();
void AddMoney(int S) { this->money+=S; }
void AddFactory() { this->factory++; }
void SetRaw(int R) { this->raw = R; }
void SetProduct(int P) { this->product = P; }
void SetMoney(int M) { this->money = M; }
void SetFactory(int F) { this->factory = F; }
};
class Game {
int level;
int prod;
public:
void SetLevel(int L) { this->level = L; }
void UpLevel() { this->level++; }
void SetProd(int P) { this->prod = P; }
};
class Bot:public Player {
int sd;
public:
};
Player::Player(int N, int M, int R, int F, int P)
{
this->number = N;
this->money = M;
this->raw = R;
this->factory = F;
this->product = P;
}
void Player::PrintStat()
{
printf("Player N");
}
int main ()
{
return 0;
}