-
-
Notifications
You must be signed in to change notification settings - Fork 82
dtl::shape::PointGridWithBorder (形状クラス)
Kasugaccho edited this page Apr 12, 2019
·
11 revisions
#include <DTL.hpp>
#include <cstdint>
#include <array>
int main() {
using shape_t = std::uint_fast8_t;
std::array<std::array<shape_t, 16>, 12> matrix{ {} };
dtl::shape::PointGridWithBorder<shape_t>(1, 2).draw(matrix);
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
dtl::console::OutputString<shape_t>("//", "##", "%%").draw(matrix);
return 0;
}
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,0,1,0,1,0,1,0,1,0,1,0,1,0,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,0,1,0,1,0,1,0,1,0,1,0,1,0,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,0,1,0,1,0,1,0,1,0,1,0,1,0,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,0,1,0,1,0,1,0,1,0,1,0,1,0,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%//////////////////////////%%%%
%%//##//##//##//##//##//##//%%%%
%%//////////////////////////%%%%
%%//##//##//##//##//##//##//%%%%
%%//////////////////////////%%%%
%%//##//##//##//##//##//##//%%%%
%%//////////////////////////%%%%
%%//##//##//##//##//##//##//%%%%
%%//////////////////////////%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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)