-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparticle.hpp
More file actions
72 lines (57 loc) · 891 Bytes
/
particle.hpp
File metadata and controls
72 lines (57 loc) · 891 Bytes
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
#ifndef PARTICLE
#define PARTICLE
#include <iostream>
enum {
EMPTY = -1,
WATER, // 0
SAND, // 1
STONE, // 2
WOOD, // 3
AIR, // 5
};
enum {
POWDER,
SOLID,
LIQUID,
GAS,
};
const int melting_point[6] =
{
0, // WATER
1000, // SAND
1000, // STONE
200, // WOOD
1000,
-300,
};
const int boiling_point[6] =
{
100, // WATER
2500, // SAND
2500, // STONE
200, // WOOD
200,
-100,
};
const int ignition_point[6] =
{
};
class particle
{
public:
particle();
particle(int);
void swap(particle&);
particle& operator=(particle);
void move() {};
void recolor();
int element = EMPTY;
int state = GAS;
float x_velocity = 0;
float y_velocity = 0;
float density = 1.0f;
float temperature = 23.0f;
int color_r = 0, color_g = 0, color_b = 0;
};
const particle empty;
#endif