-
Notifications
You must be signed in to change notification settings - Fork 0
/
point_print.hpp
60 lines (49 loc) · 1.21 KB
/
point_print.hpp
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
#include <iostream>
#include "point.hpp"
void ListOfPoints(vector<point> vec1)
{
// implement me
cout << "drawing the points..." << endl;
cout << '\n';
char m[20][20];
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
m[i][j] = '.';
}
}
//cout << "formed the array"<<m[1][2] <<endl;
m[0][0] = 'O';
int rot = vec1.size();
//cout << " the size of the array is"<< rot<<endl;
int index = 0;
cout << "----------------------> x increasing " << endl;
cout << endl;
for (int k = 0; k < rot; k++)
{
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
if (i == vec1[index].getX() && j == vec1[index].getY())
{
m[i][j] = vec1[index].getName()[0];
index++;
}
}
}
}
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
cout << m[i][j];
}
cout << " | " << '\n';
}
cout << " v";
cout << endl;
cout << endl;
cout << " increasing down ";
}