-
Notifications
You must be signed in to change notification settings - Fork 7
/
Exercise 16
36 lines (28 loc) · 1.07 KB
/
Exercise 16
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
// -----------------------------------------------------------------------------
//
// Chapter 13 - Exercise 16
/*
Do the previous exercise, but with hexagons.
*/
// https://github.com/l-paz91/principles-practice/tree/master/Graphics%20Files
// use graph.h and graph.cpp from exercise 15
// -----------------------------------------------------------------------------
//--INCLUDES--//
#include "Simple_window.h"
#include "Graph.h"
using namespace Graph_lib;
typedef Graph_lib::RightTriangle RT;
typedef Graph_lib::Regular_Hexagon H;
// -----------------------------------------------------------------------------
int main()
{
Simple_window win{ Point{100,100}, 800, 800, "Exercise 16" };
vector<H> v_h;
H::hexagonTile(v_h, 253, 50, x_max(), Point(0, 0));
for (int i = 0; i < v_h.size(); ++i)
win.attach(v_h[i]);
win.wait_for_button();
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------