ETrobocon2017 - 片山研究所モデルベース開発推進事業部
str
apps
explorer
Block.cpp
[詳解]
1
2
#include"
Block.h
"
3
#include<string.h>
4
5
//コンストラクタ
6
Block::Block
(
int
num)
7
{
8
position = num;
9
}
10
11
//デストラクタ
12
Block::~Block
(){}
13
14
void
Block::setPosition
(
int
nodeNum)
15
{
16
position = nodeNum;
17
}
18
19
void
Block::setColor
(
BlockColor
blockColor)
20
{
21
color = blockColor;
22
}
23
24
int
Block::getPosition
()
25
{
26
return
position;
27
}
28
29
BlockColor
Block::getBlockColor
()
30
{
31
return
color;
32
}
Block::getPosition
int getPosition()
Definition:
Block.cpp:24
Block::~Block
~Block()
Definition:
Block.cpp:12
BlockColor
BlockColor
Definition:
BlockColor.h:5
Block::Block
Block()=default
Block::setColor
void setColor(BlockColor blockColor)
Definition:
Block.cpp:19
Block::setPosition
void setPosition(int nodeNum)
Definition:
Block.cpp:14
Block.h
Block::getBlockColor
BlockColor getBlockColor()
Definition:
Block.cpp:29
構築:
1.8.13