-
-
Notifications
You must be signed in to change notification settings - Fork 87
Matrixの種類
Kasugaccho edited this page Apr 2, 2019
·
14 revisions
ソースコード
#include "DTL.hpp"
#include <cstddef>
#include <cstdint>
#include <array>
int main() {
using dtl::shape::Border;
using dtl::console::OutputStringU8;
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::Border<shape_t>(1).draw(matrix);
dtl::console::OutputStringBool<shape_t>("#","/").draw(matrix);
}出力結果
################
#//////////////#
#//////////////#
#//////////////#
#//////////////#
#//////////////#
#//////////////#
################
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)