ETrobocon2017 - 片山研究所モデルベース開発推進事業部
str
apps
explorer
Node.h
[詳解]
1
#ifndef _INC_NODE
2
#define _INC_NODE
3
4
#include "
BlockColor.h
"
5
6
#include<cstdlib>
7
8
9
class
Node
{
10
public
:
11
Node
();
12
~Node
();
13
void
setNeighbor
(
Node
** nodes);
14
Node
**
getNeighbor
();
15
int
getNum
();
16
BlockColor
getColor
();
17
void
setHasBlock
(
bool
exists);
18
bool
getHasBlock
();
19
void
setPosition
(
int
x,
int
y);
20
int
getPositionX
();
21
int
getPositionY
();
22
void
setNum
(
int
num);
23
void
setColor
();
24
25
private
:
26
int
nodeNum;
27
Node
* neighbor[5];
28
BlockColor
color;
29
bool
hasBlock;
30
int
positionX;
31
int
positionY;
32
33
};
34
35
#endif //INC_NODE
Node::setPosition
void setPosition(int x, int y)
Definition:
Node.cpp:85
Node::~Node
~Node()
Definition:
Node.cpp:18
Node
Definition:
Node.h:9
Node::getPositionX
int getPositionX()
Definition:
Node.cpp:91
Node::getNeighbor
Node ** getNeighbor()
Definition:
Node.cpp:57
Node::setHasBlock
void setHasBlock(bool exists)
Definition:
Node.cpp:75
BlockColor
BlockColor
Definition:
BlockColor.h:5
Node::getColor
BlockColor getColor()
Definition:
Node.cpp:69
Node::getHasBlock
bool getHasBlock()
Definition:
Node.cpp:80
Node::setColor
void setColor()
Definition:
Node.cpp:25
Node::getPositionY
int getPositionY()
Definition:
Node.cpp:96
BlockColor.h
Node::setNum
void setNum(int num)
Definition:
Node.cpp:20
Node::setNeighbor
void setNeighbor(Node **nodes)
Definition:
Node.cpp:47
Node::getNum
int getNum()
Definition:
Node.cpp:63
Node::Node
Node()
Definition:
Node.cpp:6
構築:
1.8.13