-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTile.h
48 lines (42 loc) · 1.13 KB
/
Tile.h
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
/***
* @file Tile.h
* Tile abstract class
*/
// Copyright 2019 by Julio Albornoz <[email protected]>
// The License.txt file describes the conditions under which this software may be distributed.
#pragma once
#include <unordered_map>
#include <string>
#include <GLFW/glfw3.h>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <glm/gtc/type_ptr.hpp>
class Tile{
/***
* Class which contains the information required to construct a Tile of
* a specific shape.
*
* @param scale: Scale used by the program
* @param X: Tile Width
* @param Y: Tile Height
*
* @field directions: Ant movement vectors asociated with the ant
* current orientation
* @field offset: Result of rotating the ant after reading a specific rule
*/
public:
int scale, X, Y;
std::unordered_map<int, glm::vec2> directions;
std::unordered_map<char, int> offset;
virtual void compile(glm::vec3 *color) = 0;
};
class Square_Tile : public Tile{
public:
Square_Tile(int scale);
void compile(glm::vec3 *color);
};
class Hexagon_Tile : public Tile{
public:
Hexagon_Tile(int scale);
void compile(glm::vec3 *color);
};