-
-
Notifications
You must be signed in to change notification settings - Fork 87
初級サンプル
Kasugaccho edited this page Apr 27, 2019
·
2 revisions
#include <DTL.hpp>
int main() {
//X方向の大きさ
constexpr int width = 33;
//Y方向の大きさ
constexpr int height = 17;
//ダンジョン行列 (0で初期化)
int matrix[height][width]{};
//迷路を生成 (値1の通路を作成する)
dtl::MazeDig<int>(1).draw(matrix, width, height);
//数値出力 (区切りは「,」)
dtl::OutputNumber<int>(",").draw(matrix, width, height);
//文字出力 (値0の場合は「##」、値1の場合は「 」が出力される)
dtl::OutputString<int>("##", " ").draw(matrix, width, height);
}0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,
0,0,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,
0,1,1,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,0,
0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,
0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,
0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,
0,1,0,1,1,1,1,1,0,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,0,1,0,
0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,
0,1,0,1,0,1,0,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,0,
0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,
0,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,0,
0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,
0,1,0,1,1,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,0,
0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,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,1,1,0,1,1,1,1,1,1,1,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,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)