-
-
Notifications
You must be signed in to change notification settings - Fork 81
dtl::shape::MazeDig (形状クラス)
Kasugaccho edited this page Oct 12, 2019
·
13 revisions
// v0.4.3.1 - v0.4.13.0
namespace dtl::shape {
template <typename T>
class MazeDig;
}
// v0.4.14.0 -
namespace dtl::shape {
template <typename T, typename Random_Engine = DTL_RANDOM_DEFAULT_RANDOM>
class MazeDig;
}
※ T
は1bit以上の型
※ Random_Engine
は乱数生成クラス
(デフォルトでDTL_RANDOM_DEFAULT_RANDOM
が入っている)
機能名 | 対応 |
---|---|
非長方形Matrix | 不可 |
#include <DTL.hpp>
#include <cstdint>
#include <array>
int main() {
using shape_t = std::uint_fast8_t;
std::array<std::array<shape_t, 21>, 15> matrix{ {} };
dtl::shape::MazeDig<shape_t>(1, 0).draw(matrix);
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
dtl::console::OutputStringBool<shape_t>("//", "##").draw(matrix);
return 0;
}
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,
0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,
0,1,1,1,0,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,
0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,
0,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,
0,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,1,0,1,0,
0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,
0,1,0,1,1,1,0,1,0,1,1,1,1,1,1,1,0,1,1,1,0,
0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,0,
0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,
0,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
##########################################
##//##//////////////////##//////##//////##
##//##########//######//##//##//##//######
##//////##//##//##//##//////##//////////##
######//##//##//##//##################//##
##//////##//////##//////////##//////##//##
##//######################//##//##//##//##
##//////////////////##//////##//##//##//##
##//##########//##//##//######//##//##//##
##//##//////##//##//////////////##//////##
##//##//##//##//##########################
##//////##//##//##//////##//////////##//##
######//##//######//##//##//######//##//##
##//////##//////////##//////##//////////##
##########################################
Copyright (c) 2018-2021 As Project.
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)