3 using namespace BlockSideBySide;
5 void BlockStrategy::createColorBlockPlace()
7 for(std::int8_t i = 0; i < BLOCK_NUM; i++) {
8 std::shared_ptr<ColorBlockPlace> blockPlace
9 = std::make_shared<ColorBlockPlace>(ColorArray[i], i);
10 colorBlockPlaceArray[i] = blockPlace;
14 void BlockStrategy::putColorBlock()
17 ipcd.
decode(initialPositionCode);
21 std::shared_ptr<ColorBlock> colorBlock = std::make_shared<ColorBlock>();
22 colorBlockPlaceArray[code]->block = colorBlock;
26 void BlockStrategy::connectColorBlockPlace()
28 for(std::int8_t i = 0; i < BLOCK_NUM; i++) {
30 colorBlockPlaceArray[i]->black_line[
Direction::NORTH] = colorBlockPlaceArray[i - 4];
33 colorBlockPlaceArray[i]->black_line[
Direction::SOUTH] = colorBlockPlaceArray[i + 4];
36 colorBlockPlaceArray[i]->black_line[
Direction::EAST] = colorBlockPlaceArray[i - 1];
39 colorBlockPlaceArray[i]->black_line[
Direction::WEST] = colorBlockPlaceArray[i + 1];
std::vector< std::int8_t > getInitialPositionCodeList()
std::vector< std::int8_t > decodedColorBlockCodeList
void decode(std::int32_t code)