-
-
Notifications
You must be signed in to change notification settings - Fork 82
dtl::XX::YY::drawOperator (形状描画)
Kasugaccho edited this page Apr 13, 2019
·
1 revision
#include <DTL.hpp>
#include <cstddef>
#include <cstdint>
#include <array>
int main() {
using shape_t = std::uint_fast8_t;
constexpr std::size_t width{ 16 };
constexpr std::size_t height{ 8 };
std::array<std::array<shape_t, width>, height> matrix{ {} };
dtl::shape::Rect<shape_t>(1).drawOperator(matrix, []([[maybe_unused]]shape_t) {return dtl::random::mt32bit.probability(); });
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
dtl::console::OutputString<shape_t>("//", "##").draw(matrix);
return 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)