-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNode.hpp
47 lines (35 loc) · 818 Bytes
/
Node.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
//
// Node.hpp
// TicTacToe
//
// Created by Савелий Никулин on 02.07.2024.
//
#ifndef Node_hpp
#define Node_hpp
#include <stdio.h>
#include <vector>
#include <string>
using namespace std;
class Node {
float x, y, w, h;
string name;
Node *parent;
vector<Node> nodes;
public:
Node();
void setPosition(const float x, const float y);
void setSize(const float w, const float h);
void setName(const string name);
void addNode(Node *node);
bool isInteract(Node *node);
bool isInteract(int x, int y);
bool operator==(const Node &r);
float getX();
float getY();
float getW();
float getH();
string getName();
vector<Node> &getNodes();
Node &getNodeByName(string name);
};
#endif /* Node_hpp */