-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathRogueLike.hpp
1759 lines (1662 loc) · 76.6 KB
/
RogueLike.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*#######################################################################################
Copyright (c) 2017-2019 Kasugaccho
Copyright (c) 2018-2019 As Project
https://github.com/Kasugaccho/DungeonTemplateLibrary
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)
#######################################################################################*/
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_SHAPE_ROGUE_LIKE_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_SHAPE_ROGUE_LIKE_HPP
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_BASE_STRUCT_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_BASE_STRUCT_HPP
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_SIZE_T_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_SIZE_T_HPP
#if defined(UE_BUILD_FINAL_RELEASE)
namespace dtl { namespace type { using size =::SIZE_T; } }
#else
#include <cstddef>
namespace dtl { namespace type { using size =::std::size_t; } }
#endif
#endif
namespace dtl {
inline namespace base {
template<typename Int_>
struct Coordinate1Dimensional {
Int_ x{};
Coordinate1Dimensional() = default;
constexpr Coordinate1Dimensional(const Int_& x_)noexcept :x(x_) {};
};
template<typename Int_>
struct Coordinate2Dimensional {
Int_ x{};
Int_ y{};
Coordinate2Dimensional() = default;
constexpr Coordinate2Dimensional(const Int_& x_, const Int_& y_)noexcept :x(x_), y(y_) {};
constexpr bool operator==(const ::dtl::base::Coordinate2Dimensional<Int_>& vec2_)const noexcept {
return vec2_.x == this->x && vec2_.y == this->y;
}
constexpr bool operator!=(const ::dtl::base::Coordinate2Dimensional<Int_>& vec2_)const noexcept {
return vec2_.x != this->x || vec2_.y != this->y;
}
};
using MatrixVec2 =::dtl::base::Coordinate2Dimensional<::dtl::type::size>;
template<typename Int_>
struct Coordinate3Dimensional {
Int_ x{};
Int_ y{};
Int_ z{};
Coordinate3Dimensional() = default;
constexpr Coordinate3Dimensional(const Int_& x_, const Int_& y_, const Int_& z_)noexcept :x(x_), y(y_), z(z_) {};
constexpr bool operator==(const ::dtl::base::Coordinate3Dimensional<Int_>& vec3_)const noexcept {
return vec3_.x == this->x && vec3_.y == this->y && vec3_.z == this->z;
}
constexpr bool operator!=(const ::dtl::base::Coordinate3Dimensional<Int_>& vec3_)const noexcept {
return vec3_.x != this->x || vec3_.y != this->y || vec3_.z != this->z;
}
};
using MatrixVec3 =::dtl::base::Coordinate3Dimensional<::dtl::type::size>;
template<typename Int_>
struct Coordinate2DimensionalAndLength2Dimensional {
Int_ x{};
Int_ y{};
Int_ w{};
Int_ h{};
Coordinate2DimensionalAndLength2Dimensional() = default;
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_)noexcept
:x(x_), y(y_) {};
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_, const Int_& l_)noexcept
:x(x_), y(y_), w(l_), h(l_) {};
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_, const Int_& w_, const Int_& h_)noexcept
:x(x_), y(y_), w(w_), h(h_) {};
constexpr bool operator==(const ::dtl::base::Coordinate2DimensionalAndLength2Dimensional<Int_>& range_)const noexcept {
return range_.x == this->x && range_.y == this->y && range_.w == this->w && range_.h == this->h;
}
constexpr bool operator!=(const ::dtl::base::Coordinate2DimensionalAndLength2Dimensional<Int_>& range_)const noexcept {
return range_.x != this->x || range_.y != this->y || range_.w != this->w || range_.h != this->h;
}
constexpr bool operator>(const ::dtl::base::Coordinate2DimensionalAndLength2Dimensional<Int_>& range_)const noexcept {
return (this->w * this->h) > (range_.w * range_.h);
}
constexpr bool operator>=(const ::dtl::base::Coordinate2DimensionalAndLength2Dimensional<Int_>& range_)const noexcept {
return (this->w * this->h) >= (range_.w * range_.h);
}
constexpr bool operator<(const ::dtl::base::Coordinate2DimensionalAndLength2Dimensional<Int_>& range_)const noexcept {
return (this->w * this->h) < (range_.w * range_.h);
}
constexpr bool operator<=(const ::dtl::base::Coordinate2DimensionalAndLength2Dimensional<Int_>& range_)const noexcept {
return (this->w * this->h) <= (range_.w * range_.h);
}
};
using MatrixRange =::dtl::base::Coordinate2DimensionalAndLength2Dimensional<::dtl::type::size>;
template<typename Int_>
struct Coordinate3DimensionalAndLength3Dimensional {
Int_ x{};
Int_ y{};
Int_ z{};
Int_ w{};
Int_ h{};
Int_ d{};
Coordinate3DimensionalAndLength3Dimensional() = default;
constexpr Coordinate3DimensionalAndLength3Dimensional(const Int_& x_, const Int_& y_, const Int_& z_)noexcept
:x(x_), y(y_), z(z_) {};
constexpr Coordinate3DimensionalAndLength3Dimensional(const Int_& x_, const Int_& y_, const Int_& z_, const Int_& l_)noexcept
:x(x_), y(y_), z(z_), w(l_), h(l_), d(l_) {};
constexpr Coordinate3DimensionalAndLength3Dimensional(const Int_& x_, const Int_& y_, const Int_& z_, const Int_& w_, const Int_& h_, const Int_& d_)noexcept
:x(x_), y(y_), z(z_), w(w_), h(h_), d(d_) {};
constexpr bool operator==(const ::dtl::base::Coordinate3DimensionalAndLength3Dimensional<Int_>& range_)const noexcept {
return range_.x == this->x && range_.y == this->y && range_.z == this->z && range_.w == this->w && range_.h == this->h && range_.d == this->d;
}
constexpr bool operator!=(const ::dtl::base::Coordinate3DimensionalAndLength3Dimensional<Int_>& range_)const noexcept {
return range_.x != this->x || range_.y != this->y || range_.z != this->z || range_.w != this->w || range_.h != this->h || range_.d != this->d;
}
constexpr bool operator>(const ::dtl::base::Coordinate3DimensionalAndLength3Dimensional<Int_>& range_)const noexcept {
return (this->w * this->h * this->d) > (range_.w * range_.h * range_.d);
}
constexpr bool operator>=(const ::dtl::base::Coordinate3DimensionalAndLength3Dimensional<Int_>& range_)const noexcept {
return (this->w * this->h * this->d) >= (range_.w * range_.h * range_.d);
}
constexpr bool operator<(const ::dtl::base::Coordinate3DimensionalAndLength3Dimensional<Int_>& range_)const noexcept {
return (this->w * this->h * this->d) < (range_.w * range_.h * range_.d);
}
constexpr bool operator<=(const ::dtl::base::Coordinate3DimensionalAndLength3Dimensional<Int_>& range_)const noexcept {
return (this->w * this->h * this->d) <= (range_.w * range_.h * range_.d);
}
};
using MatrixRange3D =::dtl::base::Coordinate3DimensionalAndLength3Dimensional<::dtl::type::size>;
}
}
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_MACROS_CONSTEXPR_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_MACROS_CONSTEXPR_HPP
#ifndef DTL_VERSIONING_CPP14_CONSTEXPR
#if defined(_MSC_VER)
#if (_MSC_VER <=1900)
#define DTL_VERSIONING_CPP14_CONSTEXPR
#elif defined(_MSC_VER)&& defined(_MSVC_LANG)
#if (_MSVC_LANG >=201402L)
#define DTL_VERSIONING_CPP14_CONSTEXPR constexpr
#endif
#endif
#elif defined(__cplusplus)
#if (__cplusplus >=201402L)
#define DTL_VERSIONING_CPP14_CONSTEXPR constexpr
#endif
#endif
#endif
#ifndef DTL_VERSIONING_CPP14_CONSTEXPR
#define DTL_VERSIONING_CPP14_CONSTEXPR
#endif
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_MACROS_NODISCARD_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_MACROS_NODISCARD_HPP
#ifndef DTL_VERSIONING_CPP17_NODISCARD
# if defined(__has_cpp_attribute)&& 201402 < __cplusplus
# if __has_cpp_attribute(nodiscard)
# define DTL_VERSIONING_CPP17_NODISCARD [[nodiscard]]
# endif
# elif defined(__clang__)|| defined(__GNUC__)
# define DTL_VERSIONING_CPP17_NODISCARD __attribute__((warn_unused_result))
# elif defined(_MSC_VER)
# if 1911 <=_MSC_VER && 201402 < _MSVC_LANG
# define DTL_VERSIONING_CPP17_NODISCARD [[nodiscard]]
# else
# define DTL_VERSIONING_CPP17_NODISCARD \
__declspec( "SAL_name" \
"(" \
"\"_Must_inspect_result_\"" \
"," \
"\"\"" \
"," \
"\"2\"" \
")")__declspec("SAL_begin")__declspec("SAL_post")__declspec("SAL_mustInspect")__declspec("SAL_post")__declspec("SAL_checkReturn")__declspec("SAL_end")
# endif
# endif
#endif
#ifndef DTL_VERSIONING_CPP17_NODISCARD
#define DTL_VERSIONING_CPP17_NODISCARD
#endif
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_FORWARD_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_FORWARD_HPP
#ifndef DTL_TYPE_FORWARD
#if defined(UE_BUILD_FINAL_RELEASE)
#define DTL_TYPE_FORWARD ::Forward
#else
#include <utility>
#define DTL_TYPE_FORWARD ::std::forward
#endif
#endif
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_INT_X_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_INT_X_HPP
#if defined(UE_BUILD_FINAL_RELEASE)
namespace dtl {
namespace type {
using int8 =::int8;
using int16 =::int16;
using int32 =::int32;
using int64 =::int64;
using uint8 =::uint8;
using uint16 =::uint16;
using uint32 =::uint32;
using uint64 =::uint64;
using int_fast8 =::int8;
using int_fast16 =::int16;
using int_fast32 =::int32;
using int_fast64 =::int64;
using uint_fast8 =::uint8;
using uint_fast16 =::uint16;
using uint_fast32 =::uint32;
using uint_fast64 =::uint64;
using int_least8 =::int8;
using int_least16 =::int16;
using int_least32 =::int32;
using int_least64 =::int64;
using uint_least8 =::uint8;
using uint_least16 =::uint16;
using uint_least32 =::uint32;
using uint_least64 =::uint64;
}
}
#else
#include <cstdint>
namespace dtl {
namespace type {
#ifdef INT8_MAX
using int8 =::std::int8_t;
#else
using int8 =::std::int_least8_t;
#endif
#ifdef INT16_MAX
using int16 =::std::int16_t;
#else
using int16 =::std::int_least16_t;
#endif
#ifdef INT32_MAX
using int32 =::std::int32_t;
#else
using int32 =::std::int_least32_t;
#endif
#ifdef INT64_MAX
using int64 =::std::int64_t;
#else
using int64 =::std::int_least64_t;
#endif
#ifdef UINT8_MAX
using uint8 =::std::uint8_t;
#else
using uint8 =::std::uint_least8_t;
#endif
#ifdef UINT16_MAX
using uint16 =::std::uint16_t;
#else
using uint16 =::std::uint_least16_t;
#endif
#ifdef UINT32_MAX
using uint32 =::std::uint32_t;
#else
using uint32 =::std::uint_least32_t;
#endif
#ifdef UINT64_MAX
using uint64 =::std::uint64_t;
#else
using uint64 =::std::uint_least64_t;
#endif
using int_fast8 =::std::int_fast8_t;
using int_fast16 =::std::int_fast16_t;
using int_fast32 =::std::int_fast32_t;
using int_fast64 =::std::int_fast64_t;
using uint_fast8 =::std::uint_fast8_t;
using uint_fast16 =::std::uint_fast16_t;
using uint_fast32 =::std::uint_fast32_t;
using uint_fast64 =::std::uint_fast64_t;
using int_least8 =::std::int_least8_t;
using int_least16 =::std::int_least16_t;
using int_least32 =::std::int_least32_t;
using int_least64 =::std::int_least64_t;
using uint_least8 =::std::uint_least8_t;
using uint_least16 =::std::uint_least16_t;
using uint_least32 =::std::uint_least32_t;
using uint_least64 =::std::uint_least64_t;
}
}
#endif
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_RANDOM_MERSENNE_TWISTER_32_BIT_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_RANDOM_MERSENNE_TWISTER_32_BIT_HPP
#include <cstdint>
#include <bitset>
#include <random>
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_NUMERIC_LIMITS_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_NUMERIC_LIMITS_HPP
#ifndef DTL_TYPE_NUMERIC_LIMITS
#if defined(UE_BUILD_FINAL_RELEASE)
#define DTL_TYPE_NUMERIC_LIMITS ::TNumericLimits
#else
#include <limits>
#define DTL_TYPE_NUMERIC_LIMITS ::std::numeric_limits
#endif
#endif
#ifndef DTL_TYPE_NUMERIC_LIMITS_MIN
#if defined(UE_BUILD_FINAL_RELEASE)
#define DTL_TYPE_NUMERIC_LIMITS_MIN Min
#else
#define DTL_TYPE_NUMERIC_LIMITS_MIN min
#endif
#endif
#ifndef DTL_TYPE_NUMERIC_LIMITS_MAX
#if defined(UE_BUILD_FINAL_RELEASE)
#define DTL_TYPE_NUMERIC_LIMITS_MAX Max
#else
#define DTL_TYPE_NUMERIC_LIMITS_MAX max
#endif
#endif
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_THREAD_LOCAL_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_TYPE_THREAD_LOCAL_HPP
#ifndef DTL_TYPE_THREAD_LOCAL
#if defined(__clang_major__)&& defined(__clang_minor__)
#if __clang_major__ ==3 && __clang_minor__ <=5
#define DTL_TYPE_THREAD_LOCAL
#endif
#endif
#endif
#ifndef DTL_TYPE_THREAD_LOCAL
#define DTL_TYPE_THREAD_LOCAL thread_local
#endif
#endif
#ifndef DTL_RANDOM_INIT_SEED
#define DTL_RANDOM_INIT_SEED ::std::random_device()()
#endif
#ifndef DTL_RANDOM_ENGINE
#define DTL_RANDOM_ENGINE ::dtl::random::RandClassMT::random_engine
#endif
namespace dtl {
inline namespace random {
template<typename T>
DTL_VERSIONING_CPP17_NODISCARD
constexpr ::dtl::type::size bitCheck(const T value_, const ::dtl::type::size bit_ = 0)noexcept {
return (value_ == 0) ? bit_ : ::dtl::random::bitCheck(value_ / 2, bit_ + 1);
}
template<typename Random_Engine_ = ::std::mt19937>
class Random {
private:
Random_Engine_ mt;
::dtl::type::size bit_num{};
::dtl::type::size counter_bit1{};
::dtl::type::size counter_bit2{};
::std::uint_fast32_t random_num_bit1{};
::std::uint_fast32_t random_num_bit2{};
template<typename T>
DTL_VERSIONING_CPP17_NODISCARD
constexpr ::dtl::type::size bitInit2(T)const noexcept {
return ::dtl::random::bitCheck((DTL_TYPE_NUMERIC_LIMITS<T>::DTL_TYPE_NUMERIC_LIMITS_MAX)());
}
DTL_VERSIONING_CPP17_NODISCARD
::dtl::type::size bitInit()noexcept {
return this->bitInit2(this->mt());
}
DTL_VERSIONING_CPP17_NODISCARD
bool getBit1() {
if (counter_bit1 >= bit_num) {
random_num_bit1 = this->get();
counter_bit1 = 0;
}
else ++counter_bit1;
const bool tmp{ (random_num_bit1 & 1) == 0 };
random_num_bit1 >>= 1;
return tmp;
}
public:
template<typename Random_Int_ = ::dtl::type::size>
DTL_VERSIONING_CPP17_NODISCARD
Random_Int_ getBit2() {
if (this->counter_bit2 >= bit_num / 2) {
this->random_num_bit2 = this->get();
this->counter_bit2 = 0;
}
else ++counter_bit2;
const ::std::uint_fast32_t tmp{ this->random_num_bit2 & 3 };
this->random_num_bit2 >>= 2;
return static_cast<Random_Int_>(tmp);
}
void clear()noexcept {
counter_bit1 = bit_num;
counter_bit2 = bit_num / 2;
random_num_bit1 = 0;
random_num_bit2 = 0;
}
Random() :mt(DTL_RANDOM_INIT_SEED), bit_num(this->bitInit()), counter_bit1(bit_num), counter_bit2(bit_num / 2) {}
template<typename Seed_, typename ...Args_>
Random(Seed_&& seed_, Args_&& ... args_) : mt(DTL_TYPE_FORWARD<Seed_>(seed_), DTL_TYPE_FORWARD<Args_>(args_)...),
bit_num(this->bitInit()), counter_bit1(bit_num), counter_bit2(bit_num / 2) {}
void seed() {
this->mt.seed(DTL_RANDOM_INIT_SEED);
}
template<typename Seed_, typename ...Args_>
void seed(Seed_&& seed_, Args_&& ... args_) {
this->mt.seed(DTL_TYPE_FORWARD<Seed_>(seed_), DTL_TYPE_FORWARD<Args_>(args_)...);
}
template<typename Random_Int_ = ::std::uint_fast32_t>
DTL_VERSIONING_CPP17_NODISCARD
Random_Int_ get() {
return static_cast<Random_Int_>(this->mt());
}
template<typename Random_Int_ = ::std::int_fast32_t, typename Random_Int2_>
DTL_VERSIONING_CPP17_NODISCARD
Random_Int_ get(const Random_Int2_ max_) {
if (static_cast<::std::int_fast32_t>(max_) <= 1)return 0;
::std::uniform_int_distribution<> uid(0, static_cast<::std::int_fast32_t>(max_) - 1);
return static_cast<Random_Int_>(uid(this->mt));
}
template<typename Random_Int_ = ::std::int_fast32_t, typename Random_Int2_, typename Random_Int3_>
DTL_VERSIONING_CPP17_NODISCARD
Random_Int_ get(const Random_Int2_ min_, const Random_Int3_ max_) {
::std::uniform_int_distribution<> uid(static_cast<::std::int_fast32_t>((min_ <= static_cast<Random_Int2_>(max_)) ? min_ : static_cast<Random_Int2_>(max_)), static_cast<::std::int_fast32_t>((min_ <= static_cast<Random_Int2_>(max_)) ? static_cast<Random_Int2_>(max_) : min_));
return static_cast<Random_Int_>(uid(this->mt));
}
DTL_VERSIONING_CPP17_NODISCARD
bool probability(const double probability_) {
::std::bernoulli_distribution uid(probability_);
return uid(this->mt);
}
DTL_VERSIONING_CPP17_NODISCARD
bool probability() {
return this->getBit1();
}
};
template<typename T>
struct RandClass {
static DTL_TYPE_THREAD_LOCAL::dtl::random::Random<T> random_engine;
};
template<typename T>
DTL_TYPE_THREAD_LOCAL::dtl::random::Random<T> RandClass<T>::random_engine;
using RandClassMT =RandClass<::std::mt19937>;
}
}
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_RANGE_RECT_BASE_ROGUE_LIKE_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_RANGE_RECT_BASE_ROGUE_LIKE_HPP
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_BASE_ROGUE_LIKE_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_BASE_ROGUE_LIKE_HPP
namespace dtl {
inline namespace base {
template<typename Matrix_Var_>
struct RogueLikeList {
Matrix_Var_ outside_wall_id{};
Matrix_Var_ inside_wall_id{};
Matrix_Var_ room_id{};
Matrix_Var_ entrance_id{};
Matrix_Var_ way_id{};
RogueLikeList() = default;
constexpr RogueLikeList(
const Matrix_Var_& wall_id_,
const Matrix_Var_& way_id_)noexcept :
outside_wall_id(wall_id_),
inside_wall_id(wall_id_),
room_id(way_id_),
entrance_id(way_id_),
way_id(way_id_) {}
constexpr RogueLikeList(
const Matrix_Var_& wall_id_,
const Matrix_Var_& room_id_,
const Matrix_Var_& way_id_)noexcept :
outside_wall_id(wall_id_),
inside_wall_id(wall_id_),
room_id(room_id_),
entrance_id(way_id_),
way_id(way_id_) {}
constexpr RogueLikeList(
const Matrix_Var_& wall_id_,
const Matrix_Var_& room_id_,
const Matrix_Var_& entrance_id_,
const Matrix_Var_& way_id_)noexcept :
outside_wall_id(wall_id_),
inside_wall_id(wall_id_),
room_id(room_id_),
entrance_id(entrance_id_),
way_id(way_id_) {}
constexpr RogueLikeList(
const Matrix_Var_& outside_wall_id_,
const Matrix_Var_& inside_wall_id_,
const Matrix_Var_& room_id_,
const Matrix_Var_& entrance_id_,
const Matrix_Var_& way_id_)noexcept :
outside_wall_id(outside_wall_id_),
inside_wall_id(inside_wall_id_),
room_id(room_id_),
entrance_id(entrance_id_),
way_id(way_id_) {}
};
template<typename Matrix_Var_>
constexpr ::dtl::base::RogueLikeList<Matrix_Var_> defaultRogueLikeList()noexcept {
return ::dtl::base::RogueLikeList<Matrix_Var_>(0, 1, 2, 3, 4);
}
}
}
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_RANGE_BASIC_RECT_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_RANGE_BASIC_RECT_HPP
namespace dtl {
inline namespace range {
template<typename Derived_>
class BasicRect {
private:
using Index_Size =::dtl::type::size;
protected:
Index_Size start_x{};
Index_Size start_y{};
Index_Size width{};
Index_Size height{};
constexpr Index_Size calcEndX(const Index_Size max_x_)const noexcept {
return (this->width == 0 || this->start_x + this->width >= max_x_)
? max_x_
: this->start_x + this->width;
}
constexpr Index_Size calcEndY(const Index_Size max_y_)const noexcept {
return (this->height == 0 || this->start_y + this->height >= max_y_)
? max_y_
: this->start_y + this->height;
}
public:
BasicRect() = default;
constexpr explicit BasicRect(const ::dtl::base::MatrixRange& matrix_range_)noexcept
:start_x(matrix_range_.x), start_y(matrix_range_.y),
width(matrix_range_.w), height(matrix_range_.h) {}
constexpr BasicRect(const Index_Size start_x_, const Index_Size start_y_, const Index_Size width_, const Index_Size height_)noexcept
:start_x(start_x_), start_y(start_y_),
width(width_), height(height_) {}
template<typename Matrix_Var_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getPointX(Matrix_Var_& value_)noexcept {
value_ = static_cast<Matrix_Var_>(this->start_x);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Var_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getPointY(Matrix_Var_& value_)noexcept {
value_ = static_cast<Matrix_Var_>(this->start_y);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Var_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getWidth(Matrix_Var_& value_)noexcept {
value_ = static_cast<Matrix_Var_>(this->width);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Var_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getHeight(Matrix_Var_& value_)noexcept {
value_ = static_cast<Matrix_Var_>(this->height);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Var_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getPoint(Matrix_Var_& value_)noexcept {
const Matrix_Var_ value{ this->start_x ,this->start_y };
value_ = value;
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Var_, typename Matrix_Int2_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getPoint(Matrix_Var_& value_, Matrix_Int2_& value2_)noexcept {
value_ = static_cast<Matrix_Var_>(this->start_x);
value2_ = static_cast<Matrix_Int2_>(this->start_y);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Var_, typename Matrix_Int2_, typename Matrix_Int3_, typename Matrix_Int4_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getRange(Matrix_Var_& value_, Matrix_Int2_& value2_, Matrix_Int3_& value3_, Matrix_Int4_& value4_)noexcept {
value_ = static_cast<Matrix_Var_>(this->start_x);
value2_ = static_cast<Matrix_Int2_>(this->start_y);
value3_ = static_cast<Matrix_Int3_>(this->width);
value4_ = static_cast<Matrix_Int4_>(this->height);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Var_, typename Matrix_Int2_, typename Matrix_Int3_, typename Matrix_Int4_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getRange(Matrix_Var_& value_, Matrix_Int2_& value2_, Matrix_Int3_& value3_)noexcept {
value_ = static_cast<Matrix_Var_>(this->start_x);
value2_ = static_cast<Matrix_Int2_>(this->start_y);
value3_ = static_cast<Matrix_Int3_>(this->width);
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Index_Size getPointX()const noexcept {
return this->start_x;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Index_Size getPointY()const noexcept {
return this->start_y;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Index_Size getWidth()const noexcept {
return this->width;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Index_Size getHeight()const noexcept {
return this->height;
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearPointX()noexcept {
this->start_x = 0;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearPointY()noexcept {
this->start_y = 0;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearWidth()noexcept {
this->width = 0;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearHeight()noexcept {
this->height = 0;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearLength()noexcept {
this->clearWidth();
this->clearHeight();
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearPoint()noexcept {
this->clearPointX();
this->clearPointY();
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearRange()noexcept {
this->clearPointX();
this->clearPointY();
this->clearWidth();
this->clearHeight();
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setPointX(const Index_Size start_x_)noexcept {
this->start_x = start_x_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setPointY(const Index_Size start_y_)noexcept {
this->start_y = start_y_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setWidth(const Index_Size width_)noexcept {
this->width = width_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setHeight(const Index_Size height_)noexcept {
this->height = height_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setPoint(const Index_Size point_)noexcept {
this->start_x = point_;
this->start_y = point_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setPoint(const Index_Size start_x_, const Index_Size start_y_)noexcept {
this->start_x = start_x_;
this->start_y = start_y_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setRange(const Index_Size start_x_, const Index_Size start_y_, const Index_Size length_)noexcept {
this->start_x = start_x_;
this->start_y = start_y_;
this->width = length_;
this->height = length_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setRange(const Index_Size start_x_, const Index_Size start_y_, const Index_Size width_, const Index_Size height_)noexcept {
this->start_x = start_x_;
this->start_y = start_y_;
this->width = width_;
this->height = height_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setRange(const ::dtl::base::MatrixRange& matrix_range_)noexcept {
this->start_x = matrix_range_.x;
this->start_y = matrix_range_.y;
this->width = matrix_range_.w;
this->height = matrix_range_.h;
return static_cast<Derived_&>(*this);
}
};
}
}
#endif
namespace dtl {
inline namespace range {
template<typename Derived_, typename Matrix_Var_>
class RectBaseRogueLike : public ::dtl::range::BasicRect<Derived_> {
private:
using Index_Size =::dtl::type::size;
using RectBase_t =::dtl::range::BasicRect<Derived_>;
protected:
::dtl::base::RogueLikeList<Matrix_Var_> rogueLikeList{};
Index_Size max_way{ 20 };
::dtl::base::MatrixRange roomRange{ 3,3,3,3 };
::dtl::base::MatrixRange wayRange{ 3,3,12,12 };
public:
template<typename Matrix_Int1_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getOutsideWall(Matrix_Int1_& value_)noexcept {
value_ = static_cast<Matrix_Int1_>(this->rogueLikeList.outside_wall_id);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Int1_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getInsideWall(Matrix_Int1_& value_)noexcept {
value_ = static_cast<Matrix_Int1_>(this->rogueLikeList.inside_wall_id);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Int1_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getRoom(Matrix_Int1_& value_)noexcept {
value_ = static_cast<Matrix_Int1_>(this->rogueLikeList.room_id);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Int1_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getEntrance(Matrix_Int1_& value_)noexcept {
value_ = static_cast<Matrix_Int1_>(this->rogueLikeList.entrance_id);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Int1_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getWay(Matrix_Int1_& value_)noexcept {
value_ = static_cast<Matrix_Int1_>(this->rogueLikeList.way_id);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Int1_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getWall(Matrix_Int1_& value_)noexcept {
value_ = static_cast<Matrix_Int1_>(this->rogueLikeList.outside_wall_id);
return static_cast<Derived_&>(*this);
}
template<typename Matrix_Int1_>
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& getMaxWay(Matrix_Int1_& value_)noexcept {
value_ = static_cast<Matrix_Int1_>(this->max_way);
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Matrix_Var_ getOutsideWall()const noexcept {
return this->rogueLikeList.outside_wall_id;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Matrix_Var_ getInsideWall()const noexcept {
return this->rogueLikeList.inside_wall_id;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Matrix_Var_ getRoom()const noexcept {
return this->rogueLikeList.room_id;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Matrix_Var_ getEntrance()const noexcept {
return this->rogueLikeList.entrance_id;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Matrix_Var_ getWay()const noexcept {
return this->rogueLikeList.way_id;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Matrix_Var_ getWall()const noexcept {
return this->rogueLikeList.outside_wall_id;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr Index_Size getMaxWay()const noexcept {
return this->max_way;
}
DTL_VERSIONING_CPP17_NODISCARD
constexpr ::dtl::base::RogueLikeList<Matrix_Var_> getValue()const noexcept {
return this->rogueLikeList;
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearOutsideWall()noexcept {
const Matrix_Var_ chick_{};
this->rogueLikeList.outside_wall_id = chick_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearInsideWall()noexcept {
const Matrix_Var_ chick_{};
this->rogueLikeList.inside_wall_id = chick_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearRoom()noexcept {
const Matrix_Var_ elephant_{};
this->rogueLikeList.room_id = elephant_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearEntrance()noexcept {
const Matrix_Var_ elephant_{};
this->rogueLikeList.entrance_id = elephant_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearWay()noexcept {
const Matrix_Var_ giraffe_{};
this->rogueLikeList.way_id = giraffe_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearWall()noexcept {
this->clearOutsideWall();
this->clearInsideWall();
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearMaxWay()noexcept {
this->max_way = 0;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clearValue()noexcept {
const ::dtl::base::RogueLikeList<Matrix_Var_> new_draw_value{};
this->rogueLikeList = new_draw_value;
this->clearMaxWay();
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& clear()noexcept {
this->clearRange();
this->clearValue();
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setOutsideWall(const Matrix_Var_& chick_)noexcept {
return this->rogueLikeList.outside_wall_id = chick_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setInsideWall(const Matrix_Var_& chick_)noexcept {
return this->rogueLikeList.inside_wall_id = chick_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setRoom(const Matrix_Var_& elephant_)noexcept {
return this->rogueLikeList.room_id = elephant_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setEntrance(const Matrix_Var_& elephant_)noexcept {
return this->rogueLikeList.entrance_id = elephant_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setWay(const Matrix_Var_& giraffe_)noexcept {
return this->rogueLikeList.way_id = giraffe_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setWall(const Matrix_Var_& giraffe_)noexcept {
return this->rogueLikeList.outside_wall_id = this->rogueLikeList.inside_wall_id = giraffe_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setMaxWay(const Index_Size& giraffe_)noexcept {
return this->max_way = giraffe_;
return static_cast<Derived_&>(*this);
}
DTL_VERSIONING_CPP14_CONSTEXPR
Derived_& setValue(const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_)noexcept {
this->rogueLikeList = draw_value_;
return static_cast<Derived_&>(*this);
}
RectBaseRogueLike() = default;
constexpr explicit RectBaseRogueLike(const ::dtl::base::MatrixRange& matrix_range_)noexcept
:RectBase_t(matrix_range_) {}
constexpr RectBaseRogueLike(const Index_Size start_x_, const Index_Size start_y_, const Index_Size width_, const Index_Size height_)noexcept
:RectBase_t(start_x_, start_y_, width_, height_) {}
constexpr explicit RectBaseRogueLike(const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_)noexcept
:rogueLikeList(draw_value_) {}
constexpr explicit RectBaseRogueLike(const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_)noexcept
:rogueLikeList(draw_value_), max_way(max_way_) {}
constexpr explicit RectBaseRogueLike(const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_, const ::dtl::base::MatrixRange& roomRange_)noexcept
:rogueLikeList(draw_value_), max_way(max_way_), roomRange(roomRange_) {}
constexpr explicit RectBaseRogueLike(const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_, const ::dtl::base::MatrixRange& roomRange_, const ::dtl::base::MatrixRange& wayRange_)noexcept
:rogueLikeList(draw_value_), max_way(max_way_), roomRange(roomRange_), wayRange(wayRange_) {}
constexpr RectBaseRogueLike(
const Matrix_Var_& outside_wall_id_,
const Matrix_Var_& inside_wall_id_,
const Matrix_Var_& room_id_,
const Matrix_Var_& entrance_id_,
const Matrix_Var_& way_id_)noexcept :
rogueLikeList(outside_wall_id_, inside_wall_id_, room_id_, entrance_id_, way_id_) {}
constexpr RectBaseRogueLike(const ::dtl::base::MatrixRange& matrix_range_, const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_)noexcept
:RectBase_t(matrix_range_),
rogueLikeList(draw_value_) {}
constexpr RectBaseRogueLike(const Index_Size start_x_, const Index_Size start_y_, const Index_Size width_, const Index_Size height_, const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_)noexcept
:RectBase_t(start_x_, start_y_, width_, height_),
rogueLikeList(draw_value_) {}
constexpr RectBaseRogueLike(
const Matrix_Var_& outside_wall_id_,
const Matrix_Var_& inside_wall_id_,
const Matrix_Var_& room_id_,
const Matrix_Var_& entrance_id_,
const Matrix_Var_& way_id_,
const Matrix_Var_& max_way_)noexcept :
rogueLikeList(outside_wall_id_, inside_wall_id_, room_id_, entrance_id_, way_id_), max_way(max_way_) {}
constexpr RectBaseRogueLike(
const Matrix_Var_& outside_wall_id_,
const Matrix_Var_& inside_wall_id_,
const Matrix_Var_& room_id_,
const Matrix_Var_& entrance_id_,
const Matrix_Var_& way_id_,
const Matrix_Var_& max_way_, const ::dtl::base::MatrixRange& roomRange_)noexcept :
rogueLikeList(outside_wall_id_, inside_wall_id_, room_id_, entrance_id_, way_id_), max_way(max_way_), roomRange(roomRange_) {}
constexpr RectBaseRogueLike(
const Matrix_Var_& outside_wall_id_,
const Matrix_Var_& inside_wall_id_,
const Matrix_Var_& room_id_,
const Matrix_Var_& entrance_id_,
const Matrix_Var_& way_id_,
const Matrix_Var_& max_way_, const ::dtl::base::MatrixRange& roomRange_, const ::dtl::base::MatrixRange& wayRange_)noexcept :
rogueLikeList(outside_wall_id_, inside_wall_id_, room_id_, entrance_id_, way_id_), max_way(max_way_), roomRange(roomRange_), wayRange(wayRange_) {}
constexpr RectBaseRogueLike(const ::dtl::base::MatrixRange& matrix_range_, const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_)noexcept
:RectBase_t(matrix_range_),
rogueLikeList(draw_value_), max_way(max_way_) {}
constexpr explicit RectBaseRogueLike(const ::dtl::base::MatrixRange& matrix_range_, const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_, const ::dtl::base::MatrixRange& roomRange_)noexcept
:RectBase_t(matrix_range_),
rogueLikeList(draw_value_), max_way(max_way_), roomRange(roomRange_) {}
constexpr explicit RectBaseRogueLike(const ::dtl::base::MatrixRange& matrix_range_, const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_, const ::dtl::base::MatrixRange& roomRange_, const ::dtl::base::MatrixRange& wayRange_)noexcept
:RectBase_t(matrix_range_),
rogueLikeList(draw_value_), max_way(max_way_), roomRange(roomRange_), wayRange(wayRange_) {}
constexpr RectBaseRogueLike(const Index_Size start_x_, const Index_Size start_y_, const Index_Size width_, const Index_Size height_, const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_)noexcept
:RectBase_t(start_x_, start_y_, width_, height_),
rogueLikeList(draw_value_), max_way(max_way_) {}
constexpr explicit RectBaseRogueLike(const Index_Size start_x_, const Index_Size start_y_, const Index_Size width_, const Index_Size height_, const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_, const ::dtl::base::MatrixRange& roomRange_)noexcept
:RectBase_t(start_x_, start_y_, width_, height_),
rogueLikeList(draw_value_), max_way(max_way_), roomRange(roomRange_) {}
constexpr explicit RectBaseRogueLike(const Index_Size start_x_, const Index_Size start_y_, const Index_Size width_, const Index_Size height_, const ::dtl::base::RogueLikeList<Matrix_Var_>& draw_value_, const Matrix_Var_& max_way_, const ::dtl::base::MatrixRange& roomRange_, const ::dtl::base::MatrixRange& wayRange_)noexcept
:RectBase_t(start_x_, start_y_, width_, height_),
rogueLikeList(draw_value_), max_way(max_way_), roomRange(roomRange_), wayRange(wayRange_) {}
};
}
}
#endif
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_UTILITY_DRAW_JAGGED_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_UTILITY_DRAW_JAGGED_HPP
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_UTILITY_MATRIX_WRAPPER_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_DTL_UTILITY_MATRIX_WRAPPER_HPP
#include <cassert>
#include <cstddef>
#include <array>