diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-30 12:34:05 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-30 12:34:05 -0400 |
commit | 4ef2c94a6da2854c0e39a0dc5da682fca2ed4b4d (patch) | |
tree | fdca338f554feec99d24bbd1458228f990bbbc6b /ext/wittle_generator/wittle_generator.cpp | |
parent | 489583486bd9d31de5bec8751d7e63997c325fd3 (diff) | |
download | wittle-4ef2c94a6da2854c0e39a0dc5da682fca2ed4b4d.tar.gz wittle-4ef2c94a6da2854c0e39a0dc5da682fca2ed4b4d.tar.bz2 wittle-4ef2c94a6da2854c0e39a0dc5da682fca2ed4b4d.zip |
many more puzzles
Diffstat (limited to 'ext/wittle_generator/wittle_generator.cpp')
-rw-r--r-- | ext/wittle_generator/wittle_generator.cpp | 523 |
1 files changed, 519 insertions, 4 deletions
diff --git a/ext/wittle_generator/wittle_generator.cpp b/ext/wittle_generator/wittle_generator.cpp index f3d2947..11bfffe 100644 --- a/ext/wittle_generator/wittle_generator.cpp +++ b/ext/wittle_generator/wittle_generator.cpp | |||
@@ -7,7 +7,7 @@ | |||
7 | Rice::Object wittle_generator_generate_easy(Rice::Object /* self */) { | 7 | Rice::Object wittle_generator_generate_easy(Rice::Object /* self */) { |
8 | Generate generator; | 8 | Generate generator; |
9 | 9 | ||
10 | int choice = Random::rand() % 46; | 10 | int choice = Random::rand() % 48; |
11 | std::cout << "Generate EASY: choice " << std::dec << choice << std::endl; | 11 | std::cout << "Generate EASY: choice " << std::dec << choice << std::endl; |
12 | 12 | ||
13 | switch (choice) { | 13 | switch (choice) { |
@@ -394,6 +394,23 @@ Rice::Object wittle_generator_generate_easy(Rice::Object /* self */) { | |||
394 | {Decoration::Stone | Decoration::Color::Green, 4}}}); | 394 | {Decoration::Stone | Decoration::Color::Green, 4}}}); |
395 | break; | 395 | break; |
396 | } | 396 | } |
397 | case 46: { | ||
398 | generator.setFlag(Generate::RegularStartEnd); | ||
399 | generator.generate(4, 4, | ||
400 | {{{Decoration::Dot, 6}, | ||
401 | {Decoration::Stone | Decoration::Color::Black, 3}, | ||
402 | {Decoration::Stone | Decoration::Color::White, 3}}}); | ||
403 | break; | ||
404 | } | ||
405 | case 47: { | ||
406 | generator.setFlag(Generate::RegularStartEnd); | ||
407 | generator.generate(4, 4, | ||
408 | {{{Decoration::Dot, 4}, | ||
409 | {Decoration::Stone | Decoration::Color::Black, 3}, | ||
410 | {Decoration::Stone | Decoration::Color::White, 2}, | ||
411 | {Decoration::Poly | Decoration::Color::Yellow, 1}}}); | ||
412 | break; | ||
413 | } | ||
397 | } | 414 | } |
398 | 415 | ||
399 | Rice::String str(generator.AsCode()); | 416 | Rice::String str(generator.AsCode()); |
@@ -403,7 +420,7 @@ Rice::Object wittle_generator_generate_easy(Rice::Object /* self */) { | |||
403 | Rice::Object wittle_generator_generate_medium(Rice::Object /* self */) { | 420 | Rice::Object wittle_generator_generate_medium(Rice::Object /* self */) { |
404 | Generate generator; | 421 | Generate generator; |
405 | 422 | ||
406 | int choice = Random::rand() % 33; | 423 | int choice = Random::rand() % 63; |
407 | std::cout << "Generate MEDIUM: choice " << std::dec << choice << std::endl; | 424 | std::cout << "Generate MEDIUM: choice " << std::dec << choice << std::endl; |
408 | 425 | ||
409 | switch (choice) { | 426 | switch (choice) { |
@@ -703,6 +720,276 @@ Rice::Object wittle_generator_generate_medium(Rice::Object /* self */) { | |||
703 | {Decoration::Exit, 1}}}); | 720 | {Decoration::Exit, 1}}}); |
704 | break; | 721 | break; |
705 | } | 722 | } |
723 | case 33: { | ||
724 | generator.setFlag(Generate::RegularStartEnd); | ||
725 | generator.generate(4, 4, | ||
726 | {{{Decoration::Dot, 4}, | ||
727 | {Decoration::Stone | Decoration::Color::Black, 2}, | ||
728 | {Decoration::Stone | Decoration::Color::White, 2}, | ||
729 | {Decoration::Star | Decoration::Color::Black, 2}, | ||
730 | {Decoration::Star | Decoration::Color::White, 2}}}); | ||
731 | break; | ||
732 | } | ||
733 | case 34: { | ||
734 | generator.setFlag(Generate::RegularStartEnd); | ||
735 | generator.generate(4, 4, | ||
736 | {{{Decoration::Dot, 4}, | ||
737 | {Decoration::Stone | Decoration::Color::Black, 1}, | ||
738 | {Decoration::Stone | Decoration::Color::White, 3}, | ||
739 | {Decoration::Star | Decoration::Color::Black, 3}, | ||
740 | {Decoration::Star | Decoration::Color::White, 1}}}); | ||
741 | break; | ||
742 | } | ||
743 | case 35: { | ||
744 | generator.setFlag(Generate::RegularStartEnd); | ||
745 | generator.generate(5, 5, | ||
746 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
747 | {Decoration::Stone | Decoration::Color::Black, 4}, | ||
748 | {Decoration::Stone | Decoration::Color::White, 4}}}); | ||
749 | break; | ||
750 | } | ||
751 | case 36: { | ||
752 | generator.setFlag(Generate::RegularStartEnd); | ||
753 | generator.generate(5, 5, | ||
754 | {{{Decoration::Stone | Decoration::Color::Cyan, 2}, | ||
755 | {Decoration::Stone | Decoration::Color::Yellow, 2}, | ||
756 | {Decoration::Star | Decoration::Color::Cyan, 3}, | ||
757 | {Decoration::Star | Decoration::Color::Yellow, 3}}}); | ||
758 | break; | ||
759 | } | ||
760 | case 37: { | ||
761 | generator.setFlag(Generate::RegularStartEnd); | ||
762 | generator.generate( | ||
763 | 6, 6, | ||
764 | {{{Decoration::Stone | Decoration::Color::Cyan, 2}, | ||
765 | {Decoration::Stone | Decoration::Color::Magenta, 2}, | ||
766 | {Decoration::Star | Decoration::Color::Cyan, 2}, | ||
767 | {Decoration::Star | Decoration::Color::Magenta, 1}, | ||
768 | {Decoration::Poly | Decoration::Color::Cyan, 1}, | ||
769 | {Decoration::Poly | Decoration::Color::Magenta, 1}}}); | ||
770 | break; | ||
771 | } | ||
772 | case 38: { | ||
773 | generator.setFlag(Generate::RegularStartEnd); | ||
774 | generator.generate( | ||
775 | 5, 5, {{{Decoration::Triangle | Decoration::Color::Orange, 10}}}); | ||
776 | break; | ||
777 | } | ||
778 | case 39: { | ||
779 | generator.setFlag(Generate::RegularStartEnd); | ||
780 | generator.generate( | ||
781 | 5, 3, | ||
782 | {{{Decoration::Stone | Decoration::Color::Black, 4}, | ||
783 | {Decoration::Stone | Decoration::Color::White, 3}, | ||
784 | {Decoration::Triangle | Decoration::Color::Orange, 4}}}); | ||
785 | break; | ||
786 | } | ||
787 | case 40: { | ||
788 | generator.setFlag(Generate::RegularStartEnd); | ||
789 | generator.generate( | ||
790 | 4, 4, | ||
791 | {{{Decoration::Dot, 25}, | ||
792 | {Decoration::Triangle | Decoration::Color::Orange, 6}}}); | ||
793 | break; | ||
794 | } | ||
795 | case 41: { | ||
796 | generator.setFlag(Generate::RegularStartEnd); | ||
797 | generator.setFlag(Generate::RequireCombineShapes); | ||
798 | generator.setSymmetry(Panel::Rotational); | ||
799 | generator.generate(5, 5, | ||
800 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}}}); | ||
801 | break; | ||
802 | } | ||
803 | case 42: { | ||
804 | generator.setFlag(Generate::RegularStartEnd); | ||
805 | generator.setFlag(Generate::DisconnectShapes); | ||
806 | generator.setFlag(Generate::BigShapes); | ||
807 | generator.generate(5, 5, | ||
808 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}}}); | ||
809 | break; | ||
810 | } | ||
811 | case 43: { | ||
812 | generator.setFlag(Generate::RegularStartEnd); | ||
813 | generator.setFlag(Generate::DisconnectShapes); | ||
814 | generator.generate( | ||
815 | 4, 4, | ||
816 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
817 | {Decoration::Poly | Decoration::Color::Blue | Decoration::Negative, | ||
818 | 1}}}); | ||
819 | break; | ||
820 | } | ||
821 | case 44: { | ||
822 | generator.setFlag(Generate::RegularStartEnd); | ||
823 | generator.generate( | ||
824 | 4, 4, | ||
825 | {{{Decoration::Stone | Decoration::Color::Black, 3}, | ||
826 | {Decoration::Stone | Decoration::Color::White, 3}, | ||
827 | {Decoration::Triangle | Decoration::Color::Orange, 4}}}); | ||
828 | break; | ||
829 | } | ||
830 | case 45: { | ||
831 | generator.setFlag(Generate::RegularStartEnd); | ||
832 | generator.generate( | ||
833 | 4, 4, | ||
834 | {{{Decoration::Star | Decoration::Color::Black, 4}, | ||
835 | {Decoration::Star | Decoration::Color::White, 4}, | ||
836 | {Decoration::Triangle | Decoration::Color::Orange, 4}}}); | ||
837 | break; | ||
838 | } | ||
839 | case 46: { | ||
840 | generator.setFlag(Generate::RegularStartEnd); | ||
841 | generator.generate( | ||
842 | 4, 4, | ||
843 | {{{Decoration::Star | Decoration::Color::Orange, 3}, | ||
844 | {Decoration::Triangle | Decoration::Color::Orange, 4}}}); | ||
845 | break; | ||
846 | } | ||
847 | case 47: { | ||
848 | generator.setFlag(Generate::RegularStartEnd); | ||
849 | generator.generate( | ||
850 | 4, 4, | ||
851 | {{{Decoration::Star | Decoration::Color::Black, 2}, | ||
852 | {Decoration::Star | Decoration::Color::Orange, 2}, | ||
853 | {Decoration::Stone | Decoration::Color::Black, 1}, | ||
854 | {Decoration::Stone | Decoration::Color::Orange, 1}, | ||
855 | {Decoration::Triangle | Decoration::Color::Orange, 4}}}); | ||
856 | break; | ||
857 | } | ||
858 | case 48: { | ||
859 | generator.setFlag(Generate::RegularStartEnd); | ||
860 | generator.setFlag(Generate::BigShapes); | ||
861 | generator.generate( | ||
862 | 4, 4, | ||
863 | {{{Decoration::Poly | Decoration::Color::Yellow | | ||
864 | Decoration::Can_Rotate, | ||
865 | 1}, | ||
866 | {Decoration::Triangle | Decoration::Color::Orange, 3}}}); | ||
867 | break; | ||
868 | } | ||
869 | case 49: { | ||
870 | generator.setFlag(Generate::RegularStartEnd); | ||
871 | generator.setFlag(Generate::BigShapes); | ||
872 | generator.generate( | ||
873 | 5, 5, | ||
874 | {{{Decoration::Poly | Decoration::Color::Yellow | | ||
875 | Decoration::Can_Rotate, | ||
876 | 1}, | ||
877 | {Decoration::Triangle | Decoration::Color::Orange, 6}}}); | ||
878 | break; | ||
879 | } | ||
880 | case 50: { | ||
881 | generator.setFlag(Generate::RegularStartEnd); | ||
882 | generator.setFlag(Generate::BigShapes); | ||
883 | generator.generate( | ||
884 | 5, 5, | ||
885 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
886 | {Decoration::Triangle | Decoration::Color::Orange, 4}}}); | ||
887 | break; | ||
888 | } | ||
889 | case 51: { | ||
890 | generator.setFlag(Generate::RegularStartEnd); | ||
891 | generator.generate( | ||
892 | 4, 4, | ||
893 | {{{Decoration::Dot, 25}, | ||
894 | {Decoration::Triangle | Decoration::Color::Orange, 4}}}); | ||
895 | break; | ||
896 | } | ||
897 | case 52: { | ||
898 | generator.setSymbol(Decoration::Start, 0, 4 * 2); | ||
899 | generator.setSymbol(Decoration::Exit, 0, 0); | ||
900 | generator.generate( | ||
901 | 4, 4, | ||
902 | {{{Decoration::Dot, 25}, | ||
903 | {Decoration::Triangle | Decoration::Color::Orange, 5}}}); | ||
904 | break; | ||
905 | } | ||
906 | case 53: { | ||
907 | generator.setSymbol(Decoration::Start, 0, 4 * 2); | ||
908 | generator.setSymbol(Decoration::Exit, 4 * 2, 4 * 2); | ||
909 | generator.generate( | ||
910 | 4, 4, | ||
911 | {{{Decoration::Dot, 25}, | ||
912 | {Decoration::Triangle | Decoration::Color::Orange, 5}}}); | ||
913 | break; | ||
914 | } | ||
915 | case 54: { | ||
916 | generator.setFlag(Generate::RegularStartEnd); | ||
917 | generator.generate( | ||
918 | 4, 4, | ||
919 | {{{Decoration::Dot, 25}, | ||
920 | {Decoration::Triangle | Decoration::Color::Orange, 6}}}); | ||
921 | break; | ||
922 | } | ||
923 | case 55: { | ||
924 | generator.setFlag(Generate::RegularStartEnd); | ||
925 | generator.setFlag(Generate::DisconnectShapes); | ||
926 | generator.generate(5, 5, | ||
927 | {{{Decoration::Poly | Decoration::Color::Yellow | | ||
928 | Decoration::Can_Rotate, | ||
929 | 3}}}); | ||
930 | break; | ||
931 | } | ||
932 | case 56: { | ||
933 | generator.setFlag(Generate::TreehouseLayout); | ||
934 | generator.generate(4, 4, | ||
935 | {{{Decoration::Star | Decoration::Color::Black, 4}, | ||
936 | {Decoration::Star | Decoration::Color::White, 4}, | ||
937 | {Decoration::Star | Decoration::Color::Orange, 4}, | ||
938 | {Decoration::Stone | Decoration::Color::Black, 1}, | ||
939 | {Decoration::Stone | Decoration::Color::White, 1}}}); | ||
940 | break; | ||
941 | } | ||
942 | case 57: { | ||
943 | generator.setFlag(Generate::RegularStartEnd); | ||
944 | generator.generate( | ||
945 | 3, 3, | ||
946 | {{{Decoration::Stone | Decoration::Color::Magenta, 2}, | ||
947 | {Decoration::Stone | Decoration::Color::Green, 1}, | ||
948 | {Decoration::Star | Decoration::Color::Magenta, 2}, | ||
949 | {Decoration::Star | Decoration::Color::Green, 3}, | ||
950 | {Decoration::Eraser | Decoration::Color::Magenta, 1}}}); | ||
951 | break; | ||
952 | } | ||
953 | case 58: { | ||
954 | generator.setFlag(Generate::RegularStartEnd); | ||
955 | generator.generate(4, 4, | ||
956 | {{{Decoration::Dot_Intersection, 25}, | ||
957 | {Decoration::Poly | Decoration::Color::Yellow, 3}}}); | ||
958 | break; | ||
959 | } | ||
960 | case 59: { | ||
961 | generator.setSymbol(Decoration::Start, 2 * 2, 2 * 2); | ||
962 | generator.setSymbol(Decoration::Exit, 4 * 2, 0); | ||
963 | generator.generate(4, 4, | ||
964 | {{{Decoration::Dot_Intersection, 25}, | ||
965 | {Decoration::Poly | Decoration::Color::Yellow | | ||
966 | Decoration::Can_Rotate, | ||
967 | 2}}}); | ||
968 | break; | ||
969 | } | ||
970 | case 60: { | ||
971 | generator.setFlag(Generate::RegularStartEnd); | ||
972 | generator.generate(5, 5, | ||
973 | {{{Decoration::Poly | Decoration::Color::Green, 4}, | ||
974 | {Decoration::Star | Decoration::Color::Green, 3}}}); | ||
975 | break; | ||
976 | } | ||
977 | case 61: { | ||
978 | generator.setFlag(Generate::RegularStartEnd); | ||
979 | generator.generate( | ||
980 | 4, 4, {{{Decoration::Triangle2 | Decoration::Color::Orange, 12}}}); | ||
981 | break; | ||
982 | } | ||
983 | case 62: { | ||
984 | generator.setSymbol(Decoration::Exit, 0, 0); | ||
985 | generator.setSymbol(Decoration::Exit, 7 * 2, 0); | ||
986 | generator.setSymbol(Decoration::Exit, 7 * 2, 7 * 2); | ||
987 | generator.generate( | ||
988 | 7, 7, | ||
989 | {{{Decoration::Triangle | Decoration::Color::Orange, 12}, | ||
990 | {Decoration::Start, 3}}}); | ||
991 | break; | ||
992 | } | ||
706 | } | 993 | } |
707 | 994 | ||
708 | Rice::String str(generator.AsCode()); | 995 | Rice::String str(generator.AsCode()); |
@@ -712,7 +999,7 @@ Rice::Object wittle_generator_generate_medium(Rice::Object /* self */) { | |||
712 | Rice::Object wittle_generator_generate_expert(Rice::Object /* self */) { | 999 | Rice::Object wittle_generator_generate_expert(Rice::Object /* self */) { |
713 | Generate generator; | 1000 | Generate generator; |
714 | 1001 | ||
715 | int choice = Random::rand() % 8; | 1002 | int choice = Random::rand() % 27; |
716 | std::cout << "Generate EXPERT: choice " << std::dec << choice << std::endl; | 1003 | std::cout << "Generate EXPERT: choice " << std::dec << choice << std::endl; |
717 | 1004 | ||
718 | switch (choice) { | 1005 | switch (choice) { |
@@ -780,7 +1067,8 @@ Rice::Object wittle_generator_generate_expert(Rice::Object /* self */) { | |||
780 | {Decoration::Dot | Decoration::Color::Yellow, 2}, | 1067 | {Decoration::Dot | Decoration::Color::Yellow, 2}, |
781 | {Decoration::Dot, 8}, | 1068 | {Decoration::Dot, 8}, |
782 | {Decoration::Eraser | Decoration::Color::Purple, 1}, | 1069 | {Decoration::Eraser | Decoration::Color::Purple, 1}, |
783 | {Decoration::Start, 1}}}); | 1070 | {Decoration::Start, 1}, |
1071 | {Decoration::Exit, 1}}}); | ||
784 | break; | 1072 | break; |
785 | } | 1073 | } |
786 | case 6: { | 1074 | case 6: { |
@@ -804,6 +1092,233 @@ Rice::Object wittle_generator_generate_expert(Rice::Object /* self */) { | |||
804 | {Decoration::Decoration::Eraser | Decoration::Color::Green, 1}}}); | 1092 | {Decoration::Decoration::Eraser | Decoration::Color::Green, 1}}}); |
805 | break; | 1093 | break; |
806 | } | 1094 | } |
1095 | case 8: { | ||
1096 | generator.setSymbol(Decoration::Exit, 0, 0); | ||
1097 | generator.setSymbol(Decoration::Exit, 0, 4 * 4); | ||
1098 | generator.setSymbol(Decoration::Exit, 4 * 4, 0); | ||
1099 | generator.setSymbol(Decoration::Exit, 4 * 4, 4 * 4); | ||
1100 | generator.generate(8, 8, | ||
1101 | {{{Decoration::Stone | Decoration::Color::White, 10}, | ||
1102 | {Decoration::Stone | Decoration::Color::Black, 10}, | ||
1103 | {Decoration::Dot_Intersection, 81}, | ||
1104 | {Decoration::Start, 8}}}); | ||
1105 | break; | ||
1106 | } | ||
1107 | case 9: { | ||
1108 | generator.setFlag(Generate::RegularStartEnd); | ||
1109 | generator.generate( | ||
1110 | 6, 6, | ||
1111 | {{{Decoration::Dot_Intersection, 49}, | ||
1112 | {Decoration::Poly | Decoration::Color::Orange, 1}, | ||
1113 | {Decoration::Poly | Decoration::Color::Blue, 1}, | ||
1114 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1115 | 2}, | ||
1116 | {Decoration::Poly | Decoration::Negative | | ||
1117 | Decoration::Color::Orange, | ||
1118 | 1}, | ||
1119 | {Decoration::Star | Decoration::Color::Orange, 4}, | ||
1120 | {Decoration::Star | Decoration::Color::Blue, 3}, | ||
1121 | {Decoration::Triangle | Decoration::Color::Orange, 2}, | ||
1122 | {Decoration::Triangle | Decoration::Color::Blue, 1}, | ||
1123 | {Decoration::Stone | Decoration::Color::Orange, 1}, | ||
1124 | {Decoration::Stone | Decoration::Color::Blue, 2}, | ||
1125 | {Decoration::Eraser | Decoration::Color::White, 1}}}); | ||
1126 | break; | ||
1127 | } | ||
1128 | case 10: { | ||
1129 | generator.setFlag(Generate::RegularStartEnd); | ||
1130 | generator.setSymmetry(Panel::Vertical); | ||
1131 | generator.generate(7, 7, | ||
1132 | {{{Decoration::Poly | Decoration::Color::Yellow, 5}}}); | ||
1133 | break; | ||
1134 | } | ||
1135 | case 11: { | ||
1136 | generator.setFlag(Generate::RegularStartEnd); | ||
1137 | generator.setSymmetry(Panel::Rotational); | ||
1138 | generator.generate(7, 7, | ||
1139 | {{{Decoration::Poly | Decoration::Color::Yellow, 5}}}); | ||
1140 | break; | ||
1141 | } | ||
1142 | case 12: { | ||
1143 | generator.setFlag(Generate::RegularStartEnd); | ||
1144 | generator.generate(5, 5, | ||
1145 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
1146 | {Decoration::Poly | Decoration::Color::Yellow | | ||
1147 | Decoration::Can_Rotate, | ||
1148 | 1}, | ||
1149 | {Decoration::Stone | Decoration::Color::Black, 5}, | ||
1150 | {Decoration::Stone | Decoration::Color::White, 3}}}); | ||
1151 | break; | ||
1152 | } | ||
1153 | case 13: { | ||
1154 | generator.setFlag(Generate::RegularStartEnd); | ||
1155 | generator.generate( | ||
1156 | 4, 4, | ||
1157 | {{{Decoration::Poly | Decoration::Color::Yellow, 1}, | ||
1158 | {Decoration::Poly | Decoration::Color::Yellow | | ||
1159 | Decoration::Can_Rotate, | ||
1160 | 1}, | ||
1161 | {Decoration::Triangle | Decoration::Color::Orange, 3}}}); | ||
1162 | break; | ||
1163 | } | ||
1164 | case 14: { | ||
1165 | generator.setFlag(Generate::RegularStartEnd); | ||
1166 | generator.generate( | ||
1167 | 4, 4, | ||
1168 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
1169 | {Decoration::Poly | Decoration::Color::Yellow | | ||
1170 | Decoration::Can_Rotate, | ||
1171 | 1}, | ||
1172 | {Decoration::Triangle | Decoration::Color::Orange, 2}, | ||
1173 | {Decoration::Stone | Decoration::Color::Black, 2}, | ||
1174 | {Decoration::Stone | Decoration::Color::White, 2}}}); | ||
1175 | break; | ||
1176 | } | ||
1177 | case 15: { | ||
1178 | generator.setFlag(Generate::RegularStartEnd); | ||
1179 | generator.setFlag(Generate::BigShapes); | ||
1180 | generator.generate( | ||
1181 | 5, 5, | ||
1182 | {{{Decoration::Poly | Decoration::Color::Yellow | | ||
1183 | Decoration::Can_Rotate, | ||
1184 | 2}, | ||
1185 | {Decoration::Triangle | Decoration::Color::Orange, 3}, | ||
1186 | {Decoration::Stone | Decoration::Color::Black, 3}, | ||
1187 | {Decoration::Stone | Decoration::Color::White, 3}}}); | ||
1188 | break; | ||
1189 | } | ||
1190 | case 16: { | ||
1191 | generator.setFlag(Generate::StartEdgeOnly); | ||
1192 | generator.setSymbol(Decoration::Exit, 4 * 2, 0); | ||
1193 | generator.generate(4, 4, | ||
1194 | {{{Decoration::Dot_Intersection, 25}, | ||
1195 | {Decoration::Poly | Decoration::Color::Yellow, 1}, | ||
1196 | {Decoration::Poly | Decoration::Color::Yellow | | ||
1197 | Decoration::Can_Rotate, | ||
1198 | 2}, | ||
1199 | {Decoration::Start, 1}}}); | ||
1200 | break; | ||
1201 | } | ||
1202 | case 17: { | ||
1203 | generator.setFlag(Generate::StartEdgeOnly); | ||
1204 | generator.setSymbol(Decoration::Exit, 4 * 2, 0); | ||
1205 | generator.generate(5, 5, | ||
1206 | {{{Decoration::Dot_Intersection, 36}, | ||
1207 | {Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
1208 | {Decoration::Start, 1}}}); | ||
1209 | break; | ||
1210 | } | ||
1211 | case 18: { | ||
1212 | generator.setFlag(Generate::RegularStartEnd); | ||
1213 | generator.setFlag(Generate::BigShapes); | ||
1214 | generator.setFlag(Generate::RequireCancelShapes); | ||
1215 | generator.generate( | ||
1216 | 5, 5, | ||
1217 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
1218 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1219 | 3}}}); | ||
1220 | break; | ||
1221 | } | ||
1222 | case 19: { | ||
1223 | generator.setFlag(Generate::RegularStartEnd); | ||
1224 | generator.generate( | ||
1225 | 5, 6, | ||
1226 | {{{Decoration::Dot_Intersection, 42}, | ||
1227 | {Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
1228 | {Decoration::Poly | Decoration::Color::Yellow | | ||
1229 | Decoration::Can_Rotate, | ||
1230 | 1}, | ||
1231 | {Decoration::Triangle | Decoration::Color::Orange, 3}, | ||
1232 | {Decoration::Stone | Decoration::Color::Black, 2}, | ||
1233 | {Decoration::Stone | Decoration::Color::White, 2}}}); | ||
1234 | break; | ||
1235 | } | ||
1236 | case 20: { | ||
1237 | generator.setFlag(Generate::RegularStartEnd); | ||
1238 | generator.generate( | ||
1239 | 5, 5, | ||
1240 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
1241 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1242 | 1}, | ||
1243 | {Decoration::Stone | Decoration::Color::Black, 4}, | ||
1244 | {Decoration::Stone | Decoration::Color::White, 3}}}); | ||
1245 | break; | ||
1246 | } | ||
1247 | case 21: { | ||
1248 | generator.setFlag(Generate::RegularStartEnd); | ||
1249 | generator.generate( | ||
1250 | 5, 5, | ||
1251 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
1252 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1253 | 2}, | ||
1254 | {Decoration::Triangle | Decoration::Color::Orange, 5}}}); | ||
1255 | break; | ||
1256 | } | ||
1257 | case 22: { | ||
1258 | generator.setFlag(Generate::RegularStartEnd); | ||
1259 | generator.generate( | ||
1260 | 5, 5, | ||
1261 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
1262 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1263 | 1}, | ||
1264 | {Decoration::Triangle | Decoration::Color::Orange, 3}, | ||
1265 | {Decoration::Stone | Decoration::Color::Black, 2}, | ||
1266 | {Decoration::Stone | Decoration::Color::White, 2}}}); | ||
1267 | break; | ||
1268 | } | ||
1269 | case 23: { | ||
1270 | generator.setFlag(Generate::RegularStartEnd); | ||
1271 | generator.generate( | ||
1272 | 5, 5, | ||
1273 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
1274 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1275 | 2}, | ||
1276 | {Decoration::Triangle | Decoration::Color::Orange, 3}, | ||
1277 | {Decoration::Stone | Decoration::Color::Black, 2}, | ||
1278 | {Decoration::Stone | Decoration::Color::White, 2}}}); | ||
1279 | break; | ||
1280 | } | ||
1281 | case 24: { | ||
1282 | generator.setFlag(Generate::DisconnectShapes); | ||
1283 | generator.setFlag(Generate::BigShapes); | ||
1284 | generator.setSymbol(Decoration::Start, 0, 5 * 2); | ||
1285 | generator.setSymbol(Decoration::Exit, 0, 0); | ||
1286 | generator.generate( | ||
1287 | 5, 5, | ||
1288 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
1289 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1290 | 1}, | ||
1291 | {Decoration::Triangle | Decoration::Color::Orange, 3}, | ||
1292 | {Decoration::Stone | Decoration::Color::Black, 2}, | ||
1293 | {Decoration::Stone | Decoration::Color::White, 2}}}); | ||
1294 | break; | ||
1295 | } | ||
1296 | case 25: { | ||
1297 | generator.setFlag(Generate::StartEdgeOnly); | ||
1298 | generator.setFlag(Generate::BigShapes); | ||
1299 | generator.setSymbol(Decoration::Exit, 5 * 2, 0); | ||
1300 | generator.generate( | ||
1301 | 5, 5, | ||
1302 | {{{Decoration::Dot_Intersection, 36}, | ||
1303 | {Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
1304 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1305 | 1}, | ||
1306 | {Decoration::Start, 1}}}); | ||
1307 | break; | ||
1308 | } | ||
1309 | case 26: { | ||
1310 | generator.setFlag(Generate::StartEdgeOnly); | ||
1311 | generator.setFlag(Generate::BigShapes); | ||
1312 | generator.setSymbol(Decoration::Exit, 5 * 2, 0); | ||
1313 | generator.generate( | ||
1314 | 5, 5, | ||
1315 | {{{Decoration::Dot_Intersection, 36}, | ||
1316 | {Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
1317 | {Decoration::Poly | Decoration::Negative | Decoration::Color::Blue, | ||
1318 | 2}, | ||
1319 | {Decoration::Start, 1}}}); | ||
1320 | break; | ||
1321 | } | ||
807 | } | 1322 | } |
808 | 1323 | ||
809 | Rice::String str(generator.AsCode()); | 1324 | Rice::String str(generator.AsCode()); |