etrobocon2018 feat.KatLab
770af34cce41ae9c30c41303275e1add2daae0c3 (with uncommitted changes)
総合概要
諸情報
名前空間
クラス
ファイル
ファイル一覧
ファイルメンバ
全て
クラス
名前空間
ファイル
関数
変数
列挙型
列挙値
フレンド
マクロ定義
ページ
str
apps
src
BlockArea.cpp
[詳解]
1
#include <
BlockArea.h
>
2
3
BlockSideBySide::Direction
BlockSideBySide::BlockArea::getDirection
(std::int8_t n1, std::int8_t n2)
4
{
5
if
(n1 % 4 != 3
6
&&
colorBlockPlaceArray
[n1]->black_line[
BlockSideBySide::Direction::WEST
]->getPlaceCord()
7
== n2) {
8
return
BlockSideBySide::Direction::WEST
;
9
}
else
if
(n1 % 4 != 0
10
&&
colorBlockPlaceArray
[n1]
11
->black_line[
BlockSideBySide::Direction::EAST
]
12
->getPlaceCord()
13
== n2) {
14
return
BlockSideBySide::Direction::EAST
;
15
}
else
if
(n1 > 3
16
&&
colorBlockPlaceArray
[n1]
17
->black_line[
BlockSideBySide::Direction::NORTH
]
18
->getPlaceCord()
19
== n2) {
20
return
BlockSideBySide::Direction::NORTH
;
21
}
else
{
22
return
BlockSideBySide::Direction::SOUTH
;
23
}
24
}
BlockSideBySide::BlockArea::colorBlockPlaceArray
std::array< std::shared_ptr< ColorBlockPlace >, 16 > colorBlockPlaceArray
Definition:
BlockArea.h:53
BlockArea.h
BlockSideBySide::Direction
Direction
Definition:
BlockArea.h:19
BlockSideBySide::BlockArea::getDirection
BlockSideBySide::Direction getDirection(std::int8_t n1, std::int8_t n2)
Definition:
BlockArea.cpp:3
BlockSideBySide::Direction::EAST
BlockSideBySide::Direction::WEST
BlockSideBySide::Direction::SOUTH
BlockSideBySide::Direction::NORTH
構築:
1.8.6