-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecretmsg.cpp
executable file
·110 lines (88 loc) · 2.42 KB
/
secretmsg.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
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
#include "ccc_win.cpp"
#include <iostream>
//http://agri.upm.edu.my/~chris/tal/src-polygon.html
//http://pigseye.kennesaw.edu/~showard2/color.html
/**************************************
**************************************/
/**************************************
Random Generators
**************************************/
int r_color();
int r_move();
/**************************************
Shape Drawers
**************************************/
void I(int Sx, int Sy);
void L (int Sx, int Sy);
void O (int Sx, int Sy);
void V(int Sx, int Sy);
void E(int Sx, int Sy);
void Y (int Sx, int Sy);
void U(int Sx, int Sy);
/**************************************
Global int
**************************************/
int a=1;
/**************************************
MAIN
**************************************/
int main()
{
srand(time(NULL));
int MAXxy, xran, yran;
MAXxy=50;
cwin.coord(MAXxy,MAXxy,0,0);
/*Point p[4];
xran=r_move();
yran=r_move();
for (int j=0; j<4; j++)
p[j]=Point(cos(2*3.14*j/4)+xran, sin(2*3.14*j/4)+yran);
PolyGon poly (4, &p[0]);
//////////if you wanna make each shape flicker colors
for (int i=0; i<2000; i++){
cwin.SetFillColor(r_color(),r_color(),r_color());
cwin<<poly;
// cout<<"shapes is "<<shapes<<"and size is"<<MAXxy<<endl;
}
cout<<"done";
*/
I(25,45);
return 0;
}
int r_color(){
return (rand() % 256);
}
int r_move(){
return (rand() % 10);
}
void vertrect(){
}
void I(int Sx, int Sy){
Point p[12];
p[0]= Point (Sx, Sy);
p[1]= Point (Sx+3*a, Sy);
p[2]= Point (Sx+3*a, Sy-a);
p[3]= Point (Sx+2*a, Sy-a);
p[4]= Point (Sx+2*a, Sy-3*a);
p[5]= Point (Sx+3*a, Sy-3*a);
p[6]= Point (Sx+3*a, Sy-4*a);
p[7]= Point (Sx, Sy-4*a);
p[8]= Point (Sx, Sy-3*a);
p[9]= Point (Sx+a, Sy-3*a);
p[10]= Point (Sx+a, Sy-a);
p[11]= Point (Sx, Sy-a);
PolyGon poly (12, &p[0]);
cwin<<poly;
}
void L (int Sx, int Sy){
}
void O (int Sx, int Sy){
}
void V (int Sx, int Sy){
}
void E (int Sx, int Sy){
}
void Y (int Sx, int Sy){
}
void U (int Sx, int Sy){
}