From 037d20096a3ed1369dd985a24819b7304d62d228 Mon Sep 17 00:00:00 2001 From: g-spacewhale <17550607+g-spacewhale@users.noreply.github.com> Date: Sat, 18 Nov 2017 08:22:35 +0100 Subject: [PATCH] added codebase. changed folderstructure --- .../test_puzzle_long40x40.h | 800 +++++++-------- {TeamCMU => Legacy}/Basic_Structure.txt | 68 +- {TeamCMU => Legacy}/Revision_01/Puzzle.h | 750 +++++++------- {TeamCMU => Legacy}/Revision_01/main.cpp | 320 +++--- {TeamCMU => Legacy}/Revision_02/a.out | Bin {TeamCMU => Legacy}/Revision_02/main.cpp | 608 ++++++------ {TeamCMU => Legacy}/Revision_02/puzzle.h | 936 +++++++++--------- .../Revision_02}/test_puzzle.h | 810 +++++++-------- {TeamCMU => Legacy}/Revision_03/a.out | Bin {TeamCMU => Legacy}/Revision_03/main.cpp | 228 ++--- {TeamCMU => Legacy}/Revision_03/puzzle.h | 932 ++++++++--------- .../Revision_03}/test_puzzle.h | 810 +++++++-------- Legacy/Revision_03/test_puzzle_long40x40.h | 400 ++++++++ Source/a.out | Bin 23000 -> 57392 bytes Source/header/solve.h | 153 +++ Source/main.cpp | 16 +- 16 files changed, 3690 insertions(+), 3141 deletions(-) rename {TeamCMU/Revision_03 => Codicil}/test_puzzle_long40x40.h (97%) rename {TeamCMU => Legacy}/Basic_Structure.txt (93%) rename {TeamCMU => Legacy}/Revision_01/Puzzle.h (96%) rename {TeamCMU => Legacy}/Revision_01/main.cpp (95%) rename {TeamCMU => Legacy}/Revision_02/a.out (100%) rename {TeamCMU => Legacy}/Revision_02/main.cpp (96%) rename {TeamCMU => Legacy}/Revision_02/puzzle.h (97%) rename {TeamCMU/Revision_03 => Legacy/Revision_02}/test_puzzle.h (97%) rename {TeamCMU => Legacy}/Revision_03/a.out (100%) rename {TeamCMU => Legacy}/Revision_03/main.cpp (95%) rename {TeamCMU => Legacy}/Revision_03/puzzle.h (97%) rename {TeamCMU/Revision_02 => Legacy/Revision_03}/test_puzzle.h (97%) create mode 100644 Legacy/Revision_03/test_puzzle_long40x40.h diff --git a/TeamCMU/Revision_03/test_puzzle_long40x40.h b/Codicil/test_puzzle_long40x40.h similarity index 97% rename from TeamCMU/Revision_03/test_puzzle_long40x40.h rename to Codicil/test_puzzle_long40x40.h index 5c24f00..e964f26 100644 --- a/TeamCMU/Revision_03/test_puzzle_long40x40.h +++ b/Codicil/test_puzzle_long40x40.h @@ -1,400 +1,400 @@ -myFirstBox[0].setConections(01101001); -myFirstBox[1].setConections(10011001); -myFirstBox[2].setConections(01100110); -myFirstBox[3].setConections(01101001); -myFirstBox[4].setConections(10100101); -myFirstBox[5].setConections(10010010); -myFirstBox[6].setConections(01101001); -myFirstBox[7].setConections(00101010); -myFirstBox[8].setConections(01000110); -myFirstBox[9].setConections(01011010); -myFirstBox[10].setConections(01011010); -myFirstBox[11].setConections(10010101); -myFirstBox[12].setConections(01010101); -myFirstBox[13].setConections(10101001); -myFirstBox[14].setConections(10010101); -myFirstBox[15].setConections(10101010); -myFirstBox[16].setConections(01101010); -myFirstBox[17].setConections(01101010); -myFirstBox[18].setConections(00100101); -myFirstBox[19].setConections(01100101); -myFirstBox[20].setConections(10010001); -myFirstBox[21].setConections(10010101); -myFirstBox[22].setConections(10101001); -myFirstBox[23].setConections(01010110); -myFirstBox[24].setConections(10101010); -myFirstBox[25].setConections(01101000); -myFirstBox[26].setConections(01101010); -myFirstBox[27].setConections(10010101); -myFirstBox[28].setConections(10011010); -myFirstBox[29].setConections(10011001); -myFirstBox[30].setConections(01101010); -myFirstBox[31].setConections(01100001); -myFirstBox[32].setConections(01101010); -myFirstBox[33].setConections(01100101); -myFirstBox[34].setConections(01010101); -myFirstBox[35].setConections(01010110); -myFirstBox[36].setConections(01101010); -myFirstBox[37].setConections(01010110); -myFirstBox[38].setConections(01100110); -myFirstBox[39].setConections(01011010); -myFirstBox[40].setConections(01100101); -myFirstBox[41].setConections(01101001); -myFirstBox[42].setConections(01010110); -myFirstBox[43].setConections(01000110); -myFirstBox[44].setConections(01011001); -myFirstBox[45].setConections(01101001); -myFirstBox[46].setConections(10000101); -myFirstBox[47].setConections(10011010); -myFirstBox[48].setConections(10010110); -myFirstBox[49].setConections(01011010); -myFirstBox[50].setConections(10011001); -myFirstBox[51].setConections(01001001); -myFirstBox[52].setConections(10100110); -myFirstBox[53].setConections(01001010); -myFirstBox[54].setConections(10010010); -myFirstBox[55].setConections(01001010); -myFirstBox[56].setConections(01101001); -myFirstBox[57].setConections(10100110); -myFirstBox[58].setConections(10010110); -myFirstBox[59].setConections(10010110); -myFirstBox[60].setConections(10101001); -myFirstBox[61].setConections(00100101); -myFirstBox[62].setConections(00101001); -myFirstBox[63].setConections(01101001); -myFirstBox[64].setConections(01101001); -myFirstBox[65].setConections(00100101); -myFirstBox[66].setConections(10010110); -myFirstBox[67].setConections(10011010); -myFirstBox[68].setConections(01100110); -myFirstBox[69].setConections(10010110); -myFirstBox[70].setConections(01010100); -myFirstBox[71].setConections(01011010); -myFirstBox[72].setConections(01100110); -myFirstBox[73].setConections(01100101); -myFirstBox[74].setConections(10011010); -myFirstBox[75].setConections(10010101); -myFirstBox[76].setConections(10011010); -myFirstBox[77].setConections(01100101); -myFirstBox[78].setConections(10011010); -myFirstBox[79].setConections(01010110); -myFirstBox[80].setConections(01101010); -myFirstBox[81].setConections(01010101); -myFirstBox[82].setConections(01100101); -myFirstBox[83].setConections(10100101); -myFirstBox[84].setConections(01010110); -myFirstBox[85].setConections(01101010); -myFirstBox[86].setConections(10011010); -myFirstBox[87].setConections(10010110); -myFirstBox[88].setConections(01101010); -myFirstBox[89].setConections(01011010); -myFirstBox[90].setConections(01010110); -myFirstBox[91].setConections(01100101); -myFirstBox[92].setConections(00100101); -myFirstBox[93].setConections(10100101); -myFirstBox[94].setConections(10010110); -myFirstBox[95].setConections(01100110); -myFirstBox[96].setConections(10000110); -myFirstBox[97].setConections(01001001); -myFirstBox[98].setConections(10010110); -myFirstBox[99].setConections(10100110); -myFirstBox[100].setConections(10100110); -myFirstBox[101].setConections(01100010); -myFirstBox[102].setConections(01101010); -myFirstBox[103].setConections(10011001); -myFirstBox[104].setConections(01010101); -myFirstBox[105].setConections(10011010); -myFirstBox[106].setConections(10101001); -myFirstBox[107].setConections(01100110); -myFirstBox[108].setConections(10101001); -myFirstBox[109].setConections(10101001); -myFirstBox[110].setConections(10010100); -myFirstBox[111].setConections(01100110); -myFirstBox[112].setConections(01010110); -myFirstBox[113].setConections(10010101); -myFirstBox[114].setConections(01011001); -myFirstBox[115].setConections(01101010); -myFirstBox[116].setConections(10100110); -myFirstBox[117].setConections(10100101); -myFirstBox[118].setConections(10101010); -myFirstBox[119].setConections(01011010); -myFirstBox[120].setConections(10011000); -myFirstBox[121].setConections(10010101); -myFirstBox[122].setConections(10100101); -myFirstBox[123].setConections(10000110); -myFirstBox[124].setConections(01100101); -myFirstBox[125].setConections(10100110); -myFirstBox[126].setConections(10101010); -myFirstBox[127].setConections(01101001); -myFirstBox[128].setConections(01010101); -myFirstBox[129].setConections(01100101); -myFirstBox[130].setConections(10001001); -myFirstBox[131].setConections(01101010); -myFirstBox[132].setConections(01101010); -myFirstBox[133].setConections(01100010); -myFirstBox[134].setConections(01100110); -myFirstBox[135].setConections(10100001); -myFirstBox[136].setConections(10011001); -myFirstBox[137].setConections(01101010); -myFirstBox[138].setConections(01011001); -myFirstBox[139].setConections(10001001); -myFirstBox[140].setConections(01010101); -myFirstBox[141].setConections(10100101); -myFirstBox[142].setConections(01100101); -myFirstBox[143].setConections(10100101); -myFirstBox[144].setConections(10011010); -myFirstBox[145].setConections(10010001); -myFirstBox[146].setConections(10100110); -myFirstBox[147].setConections(01101010); -myFirstBox[148].setConections(10010101); -myFirstBox[149].setConections(01100101); -myFirstBox[150].setConections(10100101); -myFirstBox[151].setConections(10100110); -myFirstBox[152].setConections(10010001); -myFirstBox[153].setConections(10101000); -myFirstBox[154].setConections(10011010); -myFirstBox[155].setConections(10100110); -myFirstBox[156].setConections(01100110); -myFirstBox[157].setConections(10100110); -myFirstBox[158].setConections(01011010); -myFirstBox[159].setConections(10100001); -myFirstBox[160].setConections(01010101); -myFirstBox[161].setConections(10011010); -myFirstBox[162].setConections(10101001); -myFirstBox[163].setConections(01010110); -myFirstBox[164].setConections(01100001); -myFirstBox[165].setConections(01011001); -myFirstBox[166].setConections(01101001); -myFirstBox[167].setConections(10011001); -myFirstBox[168].setConections(10010101); -myFirstBox[169].setConections(01100010); -myFirstBox[170].setConections(01010110); -myFirstBox[171].setConections(00010101); -myFirstBox[172].setConections(10100101); -myFirstBox[173].setConections(10101010); -myFirstBox[174].setConections(10011010); -myFirstBox[175].setConections(01100101); -myFirstBox[176].setConections(10100110); -myFirstBox[177].setConections(10101001); -myFirstBox[178].setConections(01011010); -myFirstBox[179].setConections(01101001); -myFirstBox[180].setConections(10010101); -myFirstBox[181].setConections(01101010); -myFirstBox[182].setConections(10010110); -myFirstBox[183].setConections(10010110); -myFirstBox[184].setConections(10011001); -myFirstBox[185].setConections(10100101); -myFirstBox[186].setConections(10010110); -myFirstBox[187].setConections(10010110); -myFirstBox[188].setConections(10011010); -myFirstBox[189].setConections(10010101); -myFirstBox[190].setConections(01010001); -myFirstBox[191].setConections(01010100); -myFirstBox[192].setConections(10101000); -myFirstBox[193].setConections(10100110); -myFirstBox[194].setConections(01010001); -myFirstBox[195].setConections(01010101); -myFirstBox[196].setConections(01100110); -myFirstBox[197].setConections(10100101); -myFirstBox[198].setConections(00100101); -myFirstBox[199].setConections(00100101); -myFirstBox[200].setConections(10101001); -myFirstBox[201].setConections(10101001); -myFirstBox[202].setConections(01011001); -myFirstBox[203].setConections(00001010); -myFirstBox[204].setConections(01010101); -myFirstBox[205].setConections(10011010); -myFirstBox[206].setConections(10100110); -myFirstBox[207].setConections(10100101); -myFirstBox[208].setConections(10011001); -myFirstBox[209].setConections(10100110); -myFirstBox[210].setConections(10101010); -myFirstBox[211].setConections(01010110); -myFirstBox[212].setConections(01010101); -myFirstBox[213].setConections(01100010); -myFirstBox[214].setConections(10010110); -myFirstBox[215].setConections(10011010); -myFirstBox[216].setConections(01100100); -myFirstBox[217].setConections(01010101); -myFirstBox[218].setConections(10011010); -myFirstBox[219].setConections(01100101); -myFirstBox[220].setConections(10101001); -myFirstBox[221].setConections(10010101); -myFirstBox[222].setConections(10100101); -myFirstBox[223].setConections(10101001); -myFirstBox[224].setConections(10100110); -myFirstBox[225].setConections(10011001); -myFirstBox[226].setConections(01011010); -myFirstBox[227].setConections(01000101); -myFirstBox[228].setConections(01100110); -myFirstBox[229].setConections(10101010); -myFirstBox[230].setConections(01010100); -myFirstBox[231].setConections(10101010); -myFirstBox[232].setConections(10011010); -myFirstBox[233].setConections(10100110); -myFirstBox[234].setConections(10011000); -myFirstBox[235].setConections(10011001); -myFirstBox[236].setConections(01010101); -myFirstBox[237].setConections(01001010); -myFirstBox[238].setConections(01100001); -myFirstBox[239].setConections(10011010); -myFirstBox[240].setConections(10010101); -myFirstBox[241].setConections(10100110); -myFirstBox[242].setConections(01010101); -myFirstBox[243].setConections(10010101); -myFirstBox[244].setConections(01101010); -myFirstBox[245].setConections(01101010); -myFirstBox[246].setConections(10100100); -myFirstBox[247].setConections(00101010); -myFirstBox[248].setConections(01100110); -myFirstBox[249].setConections(01101000); -myFirstBox[250].setConections(01101001); -myFirstBox[251].setConections(10101001); -myFirstBox[252].setConections(01010110); -myFirstBox[253].setConections(10010110); -myFirstBox[254].setConections(01100101); -myFirstBox[255].setConections(01011001); -myFirstBox[256].setConections(01100110); -myFirstBox[257].setConections(00100101); -myFirstBox[258].setConections(01101001); -myFirstBox[259].setConections(10010110); -myFirstBox[260].setConections(10011001); -myFirstBox[261].setConections(10011001); -myFirstBox[262].setConections(01101001); -myFirstBox[263].setConections(01010010); -myFirstBox[264].setConections(10101010); -myFirstBox[265].setConections(01101001); -myFirstBox[266].setConections(01101001); -myFirstBox[267].setConections(01101001); -myFirstBox[268].setConections(10010110); -myFirstBox[269].setConections(10011001); -myFirstBox[270].setConections(01101010); -myFirstBox[271].setConections(10000110); -myFirstBox[272].setConections(10010101); -myFirstBox[273].setConections(00010101); -myFirstBox[274].setConections(10101010); -myFirstBox[275].setConections(01010110); -myFirstBox[276].setConections(01100100); -myFirstBox[277].setConections(01010101); -myFirstBox[278].setConections(10010101); -myFirstBox[279].setConections(01010101); -myFirstBox[280].setConections(01011010); -myFirstBox[281].setConections(10011010); -myFirstBox[282].setConections(00010101); -myFirstBox[283].setConections(10010110); -myFirstBox[284].setConections(10100101); -myFirstBox[285].setConections(10010101); -myFirstBox[286].setConections(01101001); -myFirstBox[287].setConections(10100101); -myFirstBox[288].setConections(01101001); -myFirstBox[289].setConections(10011001); -myFirstBox[290].setConections(01011001); -myFirstBox[291].setConections(10010110); -myFirstBox[292].setConections(01010101); -myFirstBox[293].setConections(10100110); -myFirstBox[294].setConections(10101001); -myFirstBox[295].setConections(10101001); -myFirstBox[296].setConections(01011010); -myFirstBox[297].setConections(10100101); -myFirstBox[298].setConections(01011010); -myFirstBox[299].setConections(01100110); -myFirstBox[300].setConections(10010101); -myFirstBox[301].setConections(10101001); -myFirstBox[302].setConections(10011001); -myFirstBox[303].setConections(01010101); -myFirstBox[304].setConections(01010101); -myFirstBox[305].setConections(10101001); -myFirstBox[306].setConections(01100101); -myFirstBox[307].setConections(01101000); -myFirstBox[308].setConections(01010101); -myFirstBox[309].setConections(10010110); -myFirstBox[310].setConections(10010110); -myFirstBox[311].setConections(01011010); -myFirstBox[312].setConections(10010110); -myFirstBox[313].setConections(01011001); -myFirstBox[314].setConections(01010110); -myFirstBox[315].setConections(01101001); -myFirstBox[316].setConections(10100101); -myFirstBox[317].setConections(10101010); -myFirstBox[318].setConections(10011001); -myFirstBox[319].setConections(01010110); -myFirstBox[320].setConections(10100000); -myFirstBox[321].setConections(10100101); -myFirstBox[322].setConections(00010101); -myFirstBox[323].setConections(01010110); -myFirstBox[324].setConections(01101010); -myFirstBox[325].setConections(10010110); -myFirstBox[326].setConections(00001001); -myFirstBox[327].setConections(10011010); -myFirstBox[328].setConections(10101010); -myFirstBox[329].setConections(01100101); -myFirstBox[330].setConections(01011010); -myFirstBox[331].setConections(01101010); -myFirstBox[332].setConections(10100101); -myFirstBox[333].setConections(10100101); -myFirstBox[334].setConections(01011000); -myFirstBox[335].setConections(01010110); -myFirstBox[336].setConections(00100110); -myFirstBox[337].setConections(01101010); -myFirstBox[338].setConections(01101010); -myFirstBox[339].setConections(10010110); -myFirstBox[340].setConections(10101010); -myFirstBox[341].setConections(01100110); -myFirstBox[342].setConections(10011000); -myFirstBox[343].setConections(10101010); -myFirstBox[344].setConections(01011001); -myFirstBox[345].setConections(01101001); -myFirstBox[346].setConections(10010101); -myFirstBox[347].setConections(10101010); -myFirstBox[348].setConections(10011001); -myFirstBox[349].setConections(01101001); -myFirstBox[350].setConections(01010110); -myFirstBox[351].setConections(10000110); -myFirstBox[352].setConections(10010110); -myFirstBox[353].setConections(10011010); -myFirstBox[354].setConections(01010110); -myFirstBox[355].setConections(10010010); -myFirstBox[356].setConections(10100110); -myFirstBox[357].setConections(10101001); -myFirstBox[358].setConections(01011001); -myFirstBox[359].setConections(01010000); -myFirstBox[360].setConections(10011001); -myFirstBox[361].setConections(01101001); -myFirstBox[362].setConections(01100001); -myFirstBox[363].setConections(10100110); -myFirstBox[364].setConections(10100101); -myFirstBox[365].setConections(01100101); -myFirstBox[366].setConections(01001010); -myFirstBox[367].setConections(10010110); -myFirstBox[368].setConections(10010101); -myFirstBox[369].setConections(10010100); -myFirstBox[370].setConections(01010101); -myFirstBox[371].setConections(01011000); -myFirstBox[372].setConections(01100010); -myFirstBox[373].setConections(10011001); -myFirstBox[374].setConections(01100110); -myFirstBox[375].setConections(10100101); -myFirstBox[376].setConections(01000110); -myFirstBox[377].setConections(01010101); -myFirstBox[378].setConections(01100110); -myFirstBox[379].setConections(10100110); -myFirstBox[380].setConections(00100110); -myFirstBox[381].setConections(01101001); -myFirstBox[382].setConections(01100101); -myFirstBox[383].setConections(10010101); -myFirstBox[384].setConections(01101001); -myFirstBox[385].setConections(10010110); -myFirstBox[386].setConections(10010101); -myFirstBox[387].setConections(10101001); -myFirstBox[388].setConections(10011001); -myFirstBox[389].setConections(01010110); -myFirstBox[390].setConections(10100010); -myFirstBox[391].setConections(10101001); -myFirstBox[392].setConections(01101010); -myFirstBox[393].setConections(10101010); -myFirstBox[394].setConections(01100110); -myFirstBox[395].setConections(01010101); -myFirstBox[396].setConections(01101001); -myFirstBox[397].setConections(10010101); -myFirstBox[398].setConections(10100110); -myFirstBox[399].setConections(01101010); +myFirstBox[0].setConections(01101001); +myFirstBox[1].setConections(10011001); +myFirstBox[2].setConections(01100110); +myFirstBox[3].setConections(01101001); +myFirstBox[4].setConections(10100101); +myFirstBox[5].setConections(10010010); +myFirstBox[6].setConections(01101001); +myFirstBox[7].setConections(00101010); +myFirstBox[8].setConections(01000110); +myFirstBox[9].setConections(01011010); +myFirstBox[10].setConections(01011010); +myFirstBox[11].setConections(10010101); +myFirstBox[12].setConections(01010101); +myFirstBox[13].setConections(10101001); +myFirstBox[14].setConections(10010101); +myFirstBox[15].setConections(10101010); +myFirstBox[16].setConections(01101010); +myFirstBox[17].setConections(01101010); +myFirstBox[18].setConections(00100101); +myFirstBox[19].setConections(01100101); +myFirstBox[20].setConections(10010001); +myFirstBox[21].setConections(10010101); +myFirstBox[22].setConections(10101001); +myFirstBox[23].setConections(01010110); +myFirstBox[24].setConections(10101010); +myFirstBox[25].setConections(01101000); +myFirstBox[26].setConections(01101010); +myFirstBox[27].setConections(10010101); +myFirstBox[28].setConections(10011010); +myFirstBox[29].setConections(10011001); +myFirstBox[30].setConections(01101010); +myFirstBox[31].setConections(01100001); +myFirstBox[32].setConections(01101010); +myFirstBox[33].setConections(01100101); +myFirstBox[34].setConections(01010101); +myFirstBox[35].setConections(01010110); +myFirstBox[36].setConections(01101010); +myFirstBox[37].setConections(01010110); +myFirstBox[38].setConections(01100110); +myFirstBox[39].setConections(01011010); +myFirstBox[40].setConections(01100101); +myFirstBox[41].setConections(01101001); +myFirstBox[42].setConections(01010110); +myFirstBox[43].setConections(01000110); +myFirstBox[44].setConections(01011001); +myFirstBox[45].setConections(01101001); +myFirstBox[46].setConections(10000101); +myFirstBox[47].setConections(10011010); +myFirstBox[48].setConections(10010110); +myFirstBox[49].setConections(01011010); +myFirstBox[50].setConections(10011001); +myFirstBox[51].setConections(01001001); +myFirstBox[52].setConections(10100110); +myFirstBox[53].setConections(01001010); +myFirstBox[54].setConections(10010010); +myFirstBox[55].setConections(01001010); +myFirstBox[56].setConections(01101001); +myFirstBox[57].setConections(10100110); +myFirstBox[58].setConections(10010110); +myFirstBox[59].setConections(10010110); +myFirstBox[60].setConections(10101001); +myFirstBox[61].setConections(00100101); +myFirstBox[62].setConections(00101001); +myFirstBox[63].setConections(01101001); +myFirstBox[64].setConections(01101001); +myFirstBox[65].setConections(00100101); +myFirstBox[66].setConections(10010110); +myFirstBox[67].setConections(10011010); +myFirstBox[68].setConections(01100110); +myFirstBox[69].setConections(10010110); +myFirstBox[70].setConections(01010100); +myFirstBox[71].setConections(01011010); +myFirstBox[72].setConections(01100110); +myFirstBox[73].setConections(01100101); +myFirstBox[74].setConections(10011010); +myFirstBox[75].setConections(10010101); +myFirstBox[76].setConections(10011010); +myFirstBox[77].setConections(01100101); +myFirstBox[78].setConections(10011010); +myFirstBox[79].setConections(01010110); +myFirstBox[80].setConections(01101010); +myFirstBox[81].setConections(01010101); +myFirstBox[82].setConections(01100101); +myFirstBox[83].setConections(10100101); +myFirstBox[84].setConections(01010110); +myFirstBox[85].setConections(01101010); +myFirstBox[86].setConections(10011010); +myFirstBox[87].setConections(10010110); +myFirstBox[88].setConections(01101010); +myFirstBox[89].setConections(01011010); +myFirstBox[90].setConections(01010110); +myFirstBox[91].setConections(01100101); +myFirstBox[92].setConections(00100101); +myFirstBox[93].setConections(10100101); +myFirstBox[94].setConections(10010110); +myFirstBox[95].setConections(01100110); +myFirstBox[96].setConections(10000110); +myFirstBox[97].setConections(01001001); +myFirstBox[98].setConections(10010110); +myFirstBox[99].setConections(10100110); +myFirstBox[100].setConections(10100110); +myFirstBox[101].setConections(01100010); +myFirstBox[102].setConections(01101010); +myFirstBox[103].setConections(10011001); +myFirstBox[104].setConections(01010101); +myFirstBox[105].setConections(10011010); +myFirstBox[106].setConections(10101001); +myFirstBox[107].setConections(01100110); +myFirstBox[108].setConections(10101001); +myFirstBox[109].setConections(10101001); +myFirstBox[110].setConections(10010100); +myFirstBox[111].setConections(01100110); +myFirstBox[112].setConections(01010110); +myFirstBox[113].setConections(10010101); +myFirstBox[114].setConections(01011001); +myFirstBox[115].setConections(01101010); +myFirstBox[116].setConections(10100110); +myFirstBox[117].setConections(10100101); +myFirstBox[118].setConections(10101010); +myFirstBox[119].setConections(01011010); +myFirstBox[120].setConections(10011000); +myFirstBox[121].setConections(10010101); +myFirstBox[122].setConections(10100101); +myFirstBox[123].setConections(10000110); +myFirstBox[124].setConections(01100101); +myFirstBox[125].setConections(10100110); +myFirstBox[126].setConections(10101010); +myFirstBox[127].setConections(01101001); +myFirstBox[128].setConections(01010101); +myFirstBox[129].setConections(01100101); +myFirstBox[130].setConections(10001001); +myFirstBox[131].setConections(01101010); +myFirstBox[132].setConections(01101010); +myFirstBox[133].setConections(01100010); +myFirstBox[134].setConections(01100110); +myFirstBox[135].setConections(10100001); +myFirstBox[136].setConections(10011001); +myFirstBox[137].setConections(01101010); +myFirstBox[138].setConections(01011001); +myFirstBox[139].setConections(10001001); +myFirstBox[140].setConections(01010101); +myFirstBox[141].setConections(10100101); +myFirstBox[142].setConections(01100101); +myFirstBox[143].setConections(10100101); +myFirstBox[144].setConections(10011010); +myFirstBox[145].setConections(10010001); +myFirstBox[146].setConections(10100110); +myFirstBox[147].setConections(01101010); +myFirstBox[148].setConections(10010101); +myFirstBox[149].setConections(01100101); +myFirstBox[150].setConections(10100101); +myFirstBox[151].setConections(10100110); +myFirstBox[152].setConections(10010001); +myFirstBox[153].setConections(10101000); +myFirstBox[154].setConections(10011010); +myFirstBox[155].setConections(10100110); +myFirstBox[156].setConections(01100110); +myFirstBox[157].setConections(10100110); +myFirstBox[158].setConections(01011010); +myFirstBox[159].setConections(10100001); +myFirstBox[160].setConections(01010101); +myFirstBox[161].setConections(10011010); +myFirstBox[162].setConections(10101001); +myFirstBox[163].setConections(01010110); +myFirstBox[164].setConections(01100001); +myFirstBox[165].setConections(01011001); +myFirstBox[166].setConections(01101001); +myFirstBox[167].setConections(10011001); +myFirstBox[168].setConections(10010101); +myFirstBox[169].setConections(01100010); +myFirstBox[170].setConections(01010110); +myFirstBox[171].setConections(00010101); +myFirstBox[172].setConections(10100101); +myFirstBox[173].setConections(10101010); +myFirstBox[174].setConections(10011010); +myFirstBox[175].setConections(01100101); +myFirstBox[176].setConections(10100110); +myFirstBox[177].setConections(10101001); +myFirstBox[178].setConections(01011010); +myFirstBox[179].setConections(01101001); +myFirstBox[180].setConections(10010101); +myFirstBox[181].setConections(01101010); +myFirstBox[182].setConections(10010110); +myFirstBox[183].setConections(10010110); +myFirstBox[184].setConections(10011001); +myFirstBox[185].setConections(10100101); +myFirstBox[186].setConections(10010110); +myFirstBox[187].setConections(10010110); +myFirstBox[188].setConections(10011010); +myFirstBox[189].setConections(10010101); +myFirstBox[190].setConections(01010001); +myFirstBox[191].setConections(01010100); +myFirstBox[192].setConections(10101000); +myFirstBox[193].setConections(10100110); +myFirstBox[194].setConections(01010001); +myFirstBox[195].setConections(01010101); +myFirstBox[196].setConections(01100110); +myFirstBox[197].setConections(10100101); +myFirstBox[198].setConections(00100101); +myFirstBox[199].setConections(00100101); +myFirstBox[200].setConections(10101001); +myFirstBox[201].setConections(10101001); +myFirstBox[202].setConections(01011001); +myFirstBox[203].setConections(00001010); +myFirstBox[204].setConections(01010101); +myFirstBox[205].setConections(10011010); +myFirstBox[206].setConections(10100110); +myFirstBox[207].setConections(10100101); +myFirstBox[208].setConections(10011001); +myFirstBox[209].setConections(10100110); +myFirstBox[210].setConections(10101010); +myFirstBox[211].setConections(01010110); +myFirstBox[212].setConections(01010101); +myFirstBox[213].setConections(01100010); +myFirstBox[214].setConections(10010110); +myFirstBox[215].setConections(10011010); +myFirstBox[216].setConections(01100100); +myFirstBox[217].setConections(01010101); +myFirstBox[218].setConections(10011010); +myFirstBox[219].setConections(01100101); +myFirstBox[220].setConections(10101001); +myFirstBox[221].setConections(10010101); +myFirstBox[222].setConections(10100101); +myFirstBox[223].setConections(10101001); +myFirstBox[224].setConections(10100110); +myFirstBox[225].setConections(10011001); +myFirstBox[226].setConections(01011010); +myFirstBox[227].setConections(01000101); +myFirstBox[228].setConections(01100110); +myFirstBox[229].setConections(10101010); +myFirstBox[230].setConections(01010100); +myFirstBox[231].setConections(10101010); +myFirstBox[232].setConections(10011010); +myFirstBox[233].setConections(10100110); +myFirstBox[234].setConections(10011000); +myFirstBox[235].setConections(10011001); +myFirstBox[236].setConections(01010101); +myFirstBox[237].setConections(01001010); +myFirstBox[238].setConections(01100001); +myFirstBox[239].setConections(10011010); +myFirstBox[240].setConections(10010101); +myFirstBox[241].setConections(10100110); +myFirstBox[242].setConections(01010101); +myFirstBox[243].setConections(10010101); +myFirstBox[244].setConections(01101010); +myFirstBox[245].setConections(01101010); +myFirstBox[246].setConections(10100100); +myFirstBox[247].setConections(00101010); +myFirstBox[248].setConections(01100110); +myFirstBox[249].setConections(01101000); +myFirstBox[250].setConections(01101001); +myFirstBox[251].setConections(10101001); +myFirstBox[252].setConections(01010110); +myFirstBox[253].setConections(10010110); +myFirstBox[254].setConections(01100101); +myFirstBox[255].setConections(01011001); +myFirstBox[256].setConections(01100110); +myFirstBox[257].setConections(00100101); +myFirstBox[258].setConections(01101001); +myFirstBox[259].setConections(10010110); +myFirstBox[260].setConections(10011001); +myFirstBox[261].setConections(10011001); +myFirstBox[262].setConections(01101001); +myFirstBox[263].setConections(01010010); +myFirstBox[264].setConections(10101010); +myFirstBox[265].setConections(01101001); +myFirstBox[266].setConections(01101001); +myFirstBox[267].setConections(01101001); +myFirstBox[268].setConections(10010110); +myFirstBox[269].setConections(10011001); +myFirstBox[270].setConections(01101010); +myFirstBox[271].setConections(10000110); +myFirstBox[272].setConections(10010101); +myFirstBox[273].setConections(00010101); +myFirstBox[274].setConections(10101010); +myFirstBox[275].setConections(01010110); +myFirstBox[276].setConections(01100100); +myFirstBox[277].setConections(01010101); +myFirstBox[278].setConections(10010101); +myFirstBox[279].setConections(01010101); +myFirstBox[280].setConections(01011010); +myFirstBox[281].setConections(10011010); +myFirstBox[282].setConections(00010101); +myFirstBox[283].setConections(10010110); +myFirstBox[284].setConections(10100101); +myFirstBox[285].setConections(10010101); +myFirstBox[286].setConections(01101001); +myFirstBox[287].setConections(10100101); +myFirstBox[288].setConections(01101001); +myFirstBox[289].setConections(10011001); +myFirstBox[290].setConections(01011001); +myFirstBox[291].setConections(10010110); +myFirstBox[292].setConections(01010101); +myFirstBox[293].setConections(10100110); +myFirstBox[294].setConections(10101001); +myFirstBox[295].setConections(10101001); +myFirstBox[296].setConections(01011010); +myFirstBox[297].setConections(10100101); +myFirstBox[298].setConections(01011010); +myFirstBox[299].setConections(01100110); +myFirstBox[300].setConections(10010101); +myFirstBox[301].setConections(10101001); +myFirstBox[302].setConections(10011001); +myFirstBox[303].setConections(01010101); +myFirstBox[304].setConections(01010101); +myFirstBox[305].setConections(10101001); +myFirstBox[306].setConections(01100101); +myFirstBox[307].setConections(01101000); +myFirstBox[308].setConections(01010101); +myFirstBox[309].setConections(10010110); +myFirstBox[310].setConections(10010110); +myFirstBox[311].setConections(01011010); +myFirstBox[312].setConections(10010110); +myFirstBox[313].setConections(01011001); +myFirstBox[314].setConections(01010110); +myFirstBox[315].setConections(01101001); +myFirstBox[316].setConections(10100101); +myFirstBox[317].setConections(10101010); +myFirstBox[318].setConections(10011001); +myFirstBox[319].setConections(01010110); +myFirstBox[320].setConections(10100000); +myFirstBox[321].setConections(10100101); +myFirstBox[322].setConections(00010101); +myFirstBox[323].setConections(01010110); +myFirstBox[324].setConections(01101010); +myFirstBox[325].setConections(10010110); +myFirstBox[326].setConections(00001001); +myFirstBox[327].setConections(10011010); +myFirstBox[328].setConections(10101010); +myFirstBox[329].setConections(01100101); +myFirstBox[330].setConections(01011010); +myFirstBox[331].setConections(01101010); +myFirstBox[332].setConections(10100101); +myFirstBox[333].setConections(10100101); +myFirstBox[334].setConections(01011000); +myFirstBox[335].setConections(01010110); +myFirstBox[336].setConections(00100110); +myFirstBox[337].setConections(01101010); +myFirstBox[338].setConections(01101010); +myFirstBox[339].setConections(10010110); +myFirstBox[340].setConections(10101010); +myFirstBox[341].setConections(01100110); +myFirstBox[342].setConections(10011000); +myFirstBox[343].setConections(10101010); +myFirstBox[344].setConections(01011001); +myFirstBox[345].setConections(01101001); +myFirstBox[346].setConections(10010101); +myFirstBox[347].setConections(10101010); +myFirstBox[348].setConections(10011001); +myFirstBox[349].setConections(01101001); +myFirstBox[350].setConections(01010110); +myFirstBox[351].setConections(10000110); +myFirstBox[352].setConections(10010110); +myFirstBox[353].setConections(10011010); +myFirstBox[354].setConections(01010110); +myFirstBox[355].setConections(10010010); +myFirstBox[356].setConections(10100110); +myFirstBox[357].setConections(10101001); +myFirstBox[358].setConections(01011001); +myFirstBox[359].setConections(01010000); +myFirstBox[360].setConections(10011001); +myFirstBox[361].setConections(01101001); +myFirstBox[362].setConections(01100001); +myFirstBox[363].setConections(10100110); +myFirstBox[364].setConections(10100101); +myFirstBox[365].setConections(01100101); +myFirstBox[366].setConections(01001010); +myFirstBox[367].setConections(10010110); +myFirstBox[368].setConections(10010101); +myFirstBox[369].setConections(10010100); +myFirstBox[370].setConections(01010101); +myFirstBox[371].setConections(01011000); +myFirstBox[372].setConections(01100010); +myFirstBox[373].setConections(10011001); +myFirstBox[374].setConections(01100110); +myFirstBox[375].setConections(10100101); +myFirstBox[376].setConections(01000110); +myFirstBox[377].setConections(01010101); +myFirstBox[378].setConections(01100110); +myFirstBox[379].setConections(10100110); +myFirstBox[380].setConections(00100110); +myFirstBox[381].setConections(01101001); +myFirstBox[382].setConections(01100101); +myFirstBox[383].setConections(10010101); +myFirstBox[384].setConections(01101001); +myFirstBox[385].setConections(10010110); +myFirstBox[386].setConections(10010101); +myFirstBox[387].setConections(10101001); +myFirstBox[388].setConections(10011001); +myFirstBox[389].setConections(01010110); +myFirstBox[390].setConections(10100010); +myFirstBox[391].setConections(10101001); +myFirstBox[392].setConections(01101010); +myFirstBox[393].setConections(10101010); +myFirstBox[394].setConections(01100110); +myFirstBox[395].setConections(01010101); +myFirstBox[396].setConections(01101001); +myFirstBox[397].setConections(10010101); +myFirstBox[398].setConections(10100110); +myFirstBox[399].setConections(01101010); diff --git a/TeamCMU/Basic_Structure.txt b/Legacy/Basic_Structure.txt similarity index 93% rename from TeamCMU/Basic_Structure.txt rename to Legacy/Basic_Structure.txt index fe185fc..e7cbfa6 100644 --- a/TeamCMU/Basic_Structure.txt +++ b/Legacy/Basic_Structure.txt @@ -1,34 +1,34 @@ -Übergangstruktur - -next() -{ - calculate best next move out of information in log - solve(with m and n or a puzzlepiece from box) -} - -solve() -{ - solve algorithm - - if(no solution) backtrack! - if(multiple solutions) set multiple solutions into log...setsolution(); - if(one solution) set solution into log...setsolution(); - - return{no solution, multiple solutions, one solution} - -} - -setsolution() -{ - set pointer(s) in log - set pointer to log into matrix -} - -backtrack() -{ - go into log, remove last piece - - goes back to next() -} - - +Übergangstruktur + +next() +{ + calculate best next move out of information in log + solve(with m and n or a puzzlepiece from box) +} + +solve() +{ + solve algorithm + + if(no solution) backtrack! + if(multiple solutions) set multiple solutions into log...setsolution(); + if(one solution) set solution into log...setsolution(); + + return{no solution, multiple solutions, one solution} + +} + +setsolution() +{ + set pointer(s) in log + set pointer to log into matrix +} + +backtrack() +{ + go into log, remove last piece + + goes back to next() +} + + diff --git a/TeamCMU/Revision_01/Puzzle.h b/Legacy/Revision_01/Puzzle.h similarity index 96% rename from TeamCMU/Revision_01/Puzzle.h rename to Legacy/Revision_01/Puzzle.h index 854a95d..ce9be30 100644 --- a/TeamCMU/Revision_01/Puzzle.h +++ b/Legacy/Revision_01/Puzzle.h @@ -1,375 +1,375 @@ -//Raphael Maenle - 11.11.2017 - -#include -#include -#include -#include -#include -#include - -using namespace std; - -class PuzzlePiece -{ -public: - - unsigned char Ringbuffer; - - PuzzlePiece(unsigned int flag = 0) - { - shifts=0; - boxidentifier=-1; - switch(flag) - { - case 0: - Ringbuffer=0b00000000; - break; - case 1: - Ringbuffer=0b11111111; - break; - case 3: - randomCenterPiece(); - break; - } - - } - - void Shift(unsigned int moves) - { - //Shift ringbuffer to the right n number of times - shifts = (shifts+moves)%4; - Ringbuffer = ((Ringbuffer >> (moves*2)) | (Ringbuffer << sizeof(unsigned char)*8 - (moves*2))); - } - - void printPiece() - { - cout << bitset (Ringbuffer); - } - //makes piece to random center piece - void randomCenterPiece() - { - this->Ringbuffer= 0b00000000; - - if(rand()%2) - this->Ringbuffer |= 0b01000000; - else - this->Ringbuffer |= 0b10000000; - - if(rand()%2) - this->Ringbuffer |= 0b00010000; - else - this->Ringbuffer |= 0b00100000; - - if(rand()%2) - this->Ringbuffer |= 0b00000100; - else - this->Ringbuffer |= 0b00001000; - - if(rand()%2) - this->Ringbuffer |= 0b00000001; - else - this->Ringbuffer |= 0b00000010; - } - - void assignIdentifier() - { - identifier = idcount; - idcount++; - } - - unsigned int getIdentifier() - { - return identifier; - } - void setBoxIdentifier(int new_boxid) - { - boxidentifier = new_boxid; - } - int getBoxIdentifier() - { - return boxidentifier; - } -private: - unsigned int shifts; - unsigned int identifier; - int boxidentifier; - static unsigned int idcount; - - -}; - -unsigned int PuzzlePiece::idcount(0); - -//saves a matrix cluster of puzzlepieces -class Puzzle -{ -public: - Puzzle(uint m = 7, uint n = 4): col(m), row(n) - { - Matrix = new PuzzlePiece* [n+2]; - //Box = new PuzzlePiece[n*m]; - for(int i = 0;iPlaceOfPartGood(m,n,newPiece)) - { - Matrix[n+1][m+1] = newPiece; - return 1; - } - return 0; - } - bool removePiece(uint m,uint n) - { - - Matrix[n+1][m+1] = 0b11111111; - return 1; - - } - - PuzzlePiece getPiece(uint m,uint n) - { - return Matrix[n+1][m+1]; - } - PuzzlePiece sudogetPiece(uint m,uint n) - { - return Matrix[n][m]; - } - - //check if place of the part in the matrix is correct - bool PlaceOfPartGood(unsigned int m, unsigned int n, PuzzlePiece& myPart); - bool testRotationPiece(unsigned int m, unsigned int n, PuzzlePiece& myPart); - unsigned int tryAllPieces(unsigned int m, unsigned int n, vector& myBox, unsigned int separator); - unsigned int putBackIntoBox(unsigned int m, unsigned int n, vector& myBox); - - void printPuzzle(); - - uint getCols() - { - return col; - } - - uint getRows() - { - return row; - } - //creates a random puzzle of size m columns, n rows - void createRandomPuzzle(); - //shuffles Box; - vector Shuffle(); - //prints box - void printBox(); - -private: - uint row; - uint col; - - PuzzlePiece** Matrix; - vector Box; - - void sudosetPiece(uint m,uint n,PuzzlePiece newPiece) - { - if(this->PlaceOfPartGood(m,n,newPiece)) - Matrix[n][m] = newPiece; - } - void sudoprintPuzzle() - { - for(int i=0;i (topPart) << endl; - - unsigned char rightPart = ((negativePart.Ringbuffer & 0b00110000) ^ (tmpPuzzlePiece.Ringbuffer & 0b00110000)); - cout << "rightPart: " << bitset (rightPart) << endl; - - unsigned char lowPart = ((negativePart.Ringbuffer & 0b00001100) ^ (tmpPuzzlePiece.Ringbuffer & 0b00001100)); - cout << "lowPart: " << bitset (lowPart) << endl; - - unsigned char leftPart = ((negativePart.Ringbuffer & 0b00000011) ^ (tmpPuzzlePiece.Ringbuffer & 0b00000011)); - cout << "leftPart: " << bitset (leftPart) << endl; -*/ - - if ( //simplify - ( ((((negativePart.Ringbuffer & 0b11000000) ^ (tmpPuzzlePiece.Ringbuffer & 0b11000000)) != 0b00000000) && (tmpPuzzlePiece.Ringbuffer & 0b11000000) != 0b00000000) - || ((((negativePart.Ringbuffer & 0b11000000) == 0b11000000) || ((tmpPuzzlePiece.Ringbuffer & 0b11000000) == 0b11000000)) && (tmpPuzzlePiece.Ringbuffer & 0b11000000) != 0b00000000) - || (((negativePart.Ringbuffer & 0b11000000) == 0b00000000) && ((tmpPuzzlePiece.Ringbuffer & 0b11000000) == 0b00000000)) ) - && - ( ((((negativePart.Ringbuffer & 0b00110000) ^ (tmpPuzzlePiece.Ringbuffer & 0b00110000)) != 0b00000000) && (tmpPuzzlePiece.Ringbuffer & 0b001100) != 0b00000000) - || ((((negativePart.Ringbuffer & 0b00110000) == 0b00110000) || ((tmpPuzzlePiece.Ringbuffer & 0b00110000) == 0b00110000)) && (tmpPuzzlePiece.Ringbuffer & 0b00110000) != 0b00000000) - || (((negativePart.Ringbuffer & 0b00110000) == 0b00000000) && ((tmpPuzzlePiece.Ringbuffer & 0b00110000) == 0b00000000)) ) - && - ( ((((negativePart.Ringbuffer & 0b00001100) ^ (tmpPuzzlePiece.Ringbuffer & 0b00001100)) != 0b00000000) && (tmpPuzzlePiece.Ringbuffer & 0b00001100) != 0b00000000) - || ((((negativePart.Ringbuffer & 0b00001100) == 0b00001100) || ((tmpPuzzlePiece.Ringbuffer & 0b00001100) == 0b00001100)) && (tmpPuzzlePiece.Ringbuffer & 0b00001100) != 0b00000000) - || (((negativePart.Ringbuffer & 0b00001100) == 0b00000000) && ((tmpPuzzlePiece.Ringbuffer & 0b00001100) == 0b00000000)) ) - && - ( ((((negativePart.Ringbuffer & 0b00000011) ^ (tmpPuzzlePiece.Ringbuffer & 0b00000011)) != 0b00000000) && (tmpPuzzlePiece.Ringbuffer & 0b00000011) != 0b00000000) - || ((((negativePart.Ringbuffer & 0b00000011) == 0b00000011) || ((tmpPuzzlePiece.Ringbuffer & 0b00000011) == 0b00000011)) && (tmpPuzzlePiece.Ringbuffer & 0b00000011) != 0b00000000) - || (((negativePart.Ringbuffer & 0b00000011) == 0b00000000) && ((tmpPuzzlePiece.Ringbuffer & 0b00000011) == 0b00000000)) ) - ) - - return 1; - - - return 0; -} - -void Puzzle::printPuzzle() -{ - for(int i=1;i::iterator i = Box.begin(); i != Box.end(); i++) - { - (*i).printPiece(); - cout << ' '; - } - cout << endl; -} - -vector Puzzle::Shuffle() -{ - random_shuffle(Box.begin(),Box.end()); - return Box; -} - -bool Puzzle::testRotationPiece(unsigned int m, unsigned int n, PuzzlePiece& myPart) -{ - for(int rotation=0; rotation < 4; rotation++) - { - myPart.Shift(1); - myPart.printPiece(); - cout << endl; - if(PlaceOfPartGood(m,n, myPart)) - { - - return 1; - } - } - return 0; -} - -//tries all pieces in box from separator to end and places fitting into matrix. removes fitting piece -//use separator if you have to retract to a position -unsigned int Puzzle::tryAllPieces(unsigned int m, unsigned int n, vector& myBox, unsigned int separator) -{ - - for(int i=separator; i& myBox) -{ - for(int i = 0; i < myBox.size();i++) - { - if(myBox[i].getBoxIdentifier()>getPiece(m,n).getBoxIdentifier()) - { - myBox.insert(myBox.begin()+i,getPiece(m,n)); - removePiece(m,n); - return i; - } - } -} - -vector createBox(uint m, uint n) -{ - Puzzle myFirstPuzzle(m,n); - myFirstPuzzle.createRandomPuzzle(); - return myFirstPuzzle.Shuffle(); -} +//Raphael Maenle - 11.11.2017 + +#include +#include +#include +#include +#include +#include + +using namespace std; + +class PuzzlePiece +{ +public: + + unsigned char Ringbuffer; + + PuzzlePiece(unsigned int flag = 0) + { + shifts=0; + boxidentifier=-1; + switch(flag) + { + case 0: + Ringbuffer=0b00000000; + break; + case 1: + Ringbuffer=0b11111111; + break; + case 3: + randomCenterPiece(); + break; + } + + } + + void Shift(unsigned int moves) + { + //Shift ringbuffer to the right n number of times + shifts = (shifts+moves)%4; + Ringbuffer = ((Ringbuffer >> (moves*2)) | (Ringbuffer << sizeof(unsigned char)*8 - (moves*2))); + } + + void printPiece() + { + cout << bitset (Ringbuffer); + } + //makes piece to random center piece + void randomCenterPiece() + { + this->Ringbuffer= 0b00000000; + + if(rand()%2) + this->Ringbuffer |= 0b01000000; + else + this->Ringbuffer |= 0b10000000; + + if(rand()%2) + this->Ringbuffer |= 0b00010000; + else + this->Ringbuffer |= 0b00100000; + + if(rand()%2) + this->Ringbuffer |= 0b00000100; + else + this->Ringbuffer |= 0b00001000; + + if(rand()%2) + this->Ringbuffer |= 0b00000001; + else + this->Ringbuffer |= 0b00000010; + } + + void assignIdentifier() + { + identifier = idcount; + idcount++; + } + + unsigned int getIdentifier() + { + return identifier; + } + void setBoxIdentifier(int new_boxid) + { + boxidentifier = new_boxid; + } + int getBoxIdentifier() + { + return boxidentifier; + } +private: + unsigned int shifts; + unsigned int identifier; + int boxidentifier; + static unsigned int idcount; + + +}; + +unsigned int PuzzlePiece::idcount(0); + +//saves a matrix cluster of puzzlepieces +class Puzzle +{ +public: + Puzzle(uint m = 7, uint n = 4): col(m), row(n) + { + Matrix = new PuzzlePiece* [n+2]; + //Box = new PuzzlePiece[n*m]; + for(int i = 0;iPlaceOfPartGood(m,n,newPiece)) + { + Matrix[n+1][m+1] = newPiece; + return 1; + } + return 0; + } + bool removePiece(uint m,uint n) + { + + Matrix[n+1][m+1] = 0b11111111; + return 1; + + } + + PuzzlePiece getPiece(uint m,uint n) + { + return Matrix[n+1][m+1]; + } + PuzzlePiece sudogetPiece(uint m,uint n) + { + return Matrix[n][m]; + } + + //check if place of the part in the matrix is correct + bool PlaceOfPartGood(unsigned int m, unsigned int n, PuzzlePiece& myPart); + bool testRotationPiece(unsigned int m, unsigned int n, PuzzlePiece& myPart); + unsigned int tryAllPieces(unsigned int m, unsigned int n, vector& myBox, unsigned int separator); + unsigned int putBackIntoBox(unsigned int m, unsigned int n, vector& myBox); + + void printPuzzle(); + + uint getCols() + { + return col; + } + + uint getRows() + { + return row; + } + //creates a random puzzle of size m columns, n rows + void createRandomPuzzle(); + //shuffles Box; + vector Shuffle(); + //prints box + void printBox(); + +private: + uint row; + uint col; + + PuzzlePiece** Matrix; + vector Box; + + void sudosetPiece(uint m,uint n,PuzzlePiece newPiece) + { + if(this->PlaceOfPartGood(m,n,newPiece)) + Matrix[n][m] = newPiece; + } + void sudoprintPuzzle() + { + for(int i=0;i (topPart) << endl; + + unsigned char rightPart = ((negativePart.Ringbuffer & 0b00110000) ^ (tmpPuzzlePiece.Ringbuffer & 0b00110000)); + cout << "rightPart: " << bitset (rightPart) << endl; + + unsigned char lowPart = ((negativePart.Ringbuffer & 0b00001100) ^ (tmpPuzzlePiece.Ringbuffer & 0b00001100)); + cout << "lowPart: " << bitset (lowPart) << endl; + + unsigned char leftPart = ((negativePart.Ringbuffer & 0b00000011) ^ (tmpPuzzlePiece.Ringbuffer & 0b00000011)); + cout << "leftPart: " << bitset (leftPart) << endl; +*/ + + if ( //simplify + ( ((((negativePart.Ringbuffer & 0b11000000) ^ (tmpPuzzlePiece.Ringbuffer & 0b11000000)) != 0b00000000) && (tmpPuzzlePiece.Ringbuffer & 0b11000000) != 0b00000000) + || ((((negativePart.Ringbuffer & 0b11000000) == 0b11000000) || ((tmpPuzzlePiece.Ringbuffer & 0b11000000) == 0b11000000)) && (tmpPuzzlePiece.Ringbuffer & 0b11000000) != 0b00000000) + || (((negativePart.Ringbuffer & 0b11000000) == 0b00000000) && ((tmpPuzzlePiece.Ringbuffer & 0b11000000) == 0b00000000)) ) + && + ( ((((negativePart.Ringbuffer & 0b00110000) ^ (tmpPuzzlePiece.Ringbuffer & 0b00110000)) != 0b00000000) && (tmpPuzzlePiece.Ringbuffer & 0b001100) != 0b00000000) + || ((((negativePart.Ringbuffer & 0b00110000) == 0b00110000) || ((tmpPuzzlePiece.Ringbuffer & 0b00110000) == 0b00110000)) && (tmpPuzzlePiece.Ringbuffer & 0b00110000) != 0b00000000) + || (((negativePart.Ringbuffer & 0b00110000) == 0b00000000) && ((tmpPuzzlePiece.Ringbuffer & 0b00110000) == 0b00000000)) ) + && + ( ((((negativePart.Ringbuffer & 0b00001100) ^ (tmpPuzzlePiece.Ringbuffer & 0b00001100)) != 0b00000000) && (tmpPuzzlePiece.Ringbuffer & 0b00001100) != 0b00000000) + || ((((negativePart.Ringbuffer & 0b00001100) == 0b00001100) || ((tmpPuzzlePiece.Ringbuffer & 0b00001100) == 0b00001100)) && (tmpPuzzlePiece.Ringbuffer & 0b00001100) != 0b00000000) + || (((negativePart.Ringbuffer & 0b00001100) == 0b00000000) && ((tmpPuzzlePiece.Ringbuffer & 0b00001100) == 0b00000000)) ) + && + ( ((((negativePart.Ringbuffer & 0b00000011) ^ (tmpPuzzlePiece.Ringbuffer & 0b00000011)) != 0b00000000) && (tmpPuzzlePiece.Ringbuffer & 0b00000011) != 0b00000000) + || ((((negativePart.Ringbuffer & 0b00000011) == 0b00000011) || ((tmpPuzzlePiece.Ringbuffer & 0b00000011) == 0b00000011)) && (tmpPuzzlePiece.Ringbuffer & 0b00000011) != 0b00000000) + || (((negativePart.Ringbuffer & 0b00000011) == 0b00000000) && ((tmpPuzzlePiece.Ringbuffer & 0b00000011) == 0b00000000)) ) + ) + + return 1; + + + return 0; +} + +void Puzzle::printPuzzle() +{ + for(int i=1;i::iterator i = Box.begin(); i != Box.end(); i++) + { + (*i).printPiece(); + cout << ' '; + } + cout << endl; +} + +vector Puzzle::Shuffle() +{ + random_shuffle(Box.begin(),Box.end()); + return Box; +} + +bool Puzzle::testRotationPiece(unsigned int m, unsigned int n, PuzzlePiece& myPart) +{ + for(int rotation=0; rotation < 4; rotation++) + { + myPart.Shift(1); + myPart.printPiece(); + cout << endl; + if(PlaceOfPartGood(m,n, myPart)) + { + + return 1; + } + } + return 0; +} + +//tries all pieces in box from separator to end and places fitting into matrix. removes fitting piece +//use separator if you have to retract to a position +unsigned int Puzzle::tryAllPieces(unsigned int m, unsigned int n, vector& myBox, unsigned int separator) +{ + + for(int i=separator; i& myBox) +{ + for(int i = 0; i < myBox.size();i++) + { + if(myBox[i].getBoxIdentifier()>getPiece(m,n).getBoxIdentifier()) + { + myBox.insert(myBox.begin()+i,getPiece(m,n)); + removePiece(m,n); + return i; + } + } +} + +vector createBox(uint m, uint n) +{ + Puzzle myFirstPuzzle(m,n); + myFirstPuzzle.createRandomPuzzle(); + return myFirstPuzzle.Shuffle(); +} diff --git a/TeamCMU/Revision_01/main.cpp b/Legacy/Revision_01/main.cpp similarity index 95% rename from TeamCMU/Revision_01/main.cpp rename to Legacy/Revision_01/main.cpp index 9269d3a..39a067a 100644 --- a/TeamCMU/Revision_01/main.cpp +++ b/Legacy/Revision_01/main.cpp @@ -1,160 +1,160 @@ -//Raphael Maenle - 11.11.2017 -#include -#include -#include -#include -#include -#include - -#include "puzzle.h" -//#include "Solver.h" - -using namespace std; - -void numerateBox(vector& myBox); -Puzzle solveOuterFirst( unsigned int rows, unsigned int cols, vector& myFirstBox); -void retractOuterFirst(int& i, int& j, int cols, int rows, int perimiter); - -int main() -{ - srand(time(0)); - - //Puzzle myFirstPuzzle(3,4); - - int rows = 2, cols = 3; - - vector myFirstBox = createBox(cols, rows); - numerateBox(myFirstBox); - cout << "now in solve: " << endl << endl; - solveOuterFirst(rows,cols,myFirstBox); -} - -//set box identifiers -void numerateBox(vector& myBox) -{ - for(int i = 0; i< myBox.size();i++) - myBox[i].setBoxIdentifier(i); - - return; -} - -//goes round and round puzzle and tries all pieces -Puzzle solveOuterFirst( unsigned int rows, unsigned int cols, vector& myFirstBox) -{ - int i = 0, j= 0, Boxsize = rows*cols, separator=0; - Puzzle myFirstPuzzle(cols, rows); - //first Piece - cout << "#0 i: " << i << ", j: " << j << endl; - - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - cout << "error at first piece" << endl; - } - myFirstPuzzle.printPuzzle(); -/* - Boxsize--; - - //rotate through puzzle - for(int perimiter = 0; perimiter <= (cols>rows?rows:cols)/2;) - { - cout << "perimiter: " << perimiter << endl; - while(( i == 0+perimiter && j < cols-perimiter-1) && Boxsize) - { - j++; - Boxsize--; - cout << "#1 i: " << i << ", j: " << j << endl; - - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - Boxsize++; - break; - } - else - { - Boxsize--; - } - } - - while(( i < rows-perimiter-1 && j == cols-perimiter-1) && Boxsize) - { - i++; - Boxsize--; - cout << "#2 i: " << i << ", j: " << j << endl; - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - Boxsize++; - break; - } - else - { - Boxsize--; - } - } - - while(( i == rows-perimiter-1 && j > 0+perimiter) && Boxsize) - { - j--; - Boxsize--; - cout << "#3 i: " << i << ", j: " << j << endl; - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - Boxsize++; - break; - } - else - { - Boxsize--; - } - } - - while(( i > 0+perimiter+1 && j == 0+perimiter) && Boxsize) - { - i--; - cout << "#4 i: " << i << ", j: " << j << endl; - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - Boxsize++; - break; - } - else - { - Boxsize--; - perimiter++; - } - } - } - myFirstPuzzle.printPuzzle(); -*/ - return myFirstPuzzle; -} - -//move i and j to position before -void retractOuterFirst(int& i, int& j, int cols, int rows, int perimiter) -{ - - if(( i == 0+perimiter && j <= cols-perimiter-1)) - { - j--; - } - - else if(( i <= rows-perimiter-1 && j == cols-perimiter-1)) - { - i--; - } - - else if(( i == rows-perimiter-1 && j >= 0+perimiter)) - { - j++; - } - - else if(( i >= 0+perimiter+1 && j == 0+perimiter)) - { - i++; - } - -} - +//Raphael Maenle - 11.11.2017 +#include +#include +#include +#include +#include +#include + +#include "puzzle.h" +//#include "Solver.h" + +using namespace std; + +void numerateBox(vector& myBox); +Puzzle solveOuterFirst( unsigned int rows, unsigned int cols, vector& myFirstBox); +void retractOuterFirst(int& i, int& j, int cols, int rows, int perimiter); + +int main() +{ + srand(time(0)); + + //Puzzle myFirstPuzzle(3,4); + + int rows = 2, cols = 3; + + vector myFirstBox = createBox(cols, rows); + numerateBox(myFirstBox); + cout << "now in solve: " << endl << endl; + solveOuterFirst(rows,cols,myFirstBox); +} + +//set box identifiers +void numerateBox(vector& myBox) +{ + for(int i = 0; i< myBox.size();i++) + myBox[i].setBoxIdentifier(i); + + return; +} + +//goes round and round puzzle and tries all pieces +Puzzle solveOuterFirst( unsigned int rows, unsigned int cols, vector& myFirstBox) +{ + int i = 0, j= 0, Boxsize = rows*cols, separator=0; + Puzzle myFirstPuzzle(cols, rows); + //first Piece + cout << "#0 i: " << i << ", j: " << j << endl; + + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + cout << "error at first piece" << endl; + } + myFirstPuzzle.printPuzzle(); +/* + Boxsize--; + + //rotate through puzzle + for(int perimiter = 0; perimiter <= (cols>rows?rows:cols)/2;) + { + cout << "perimiter: " << perimiter << endl; + while(( i == 0+perimiter && j < cols-perimiter-1) && Boxsize) + { + j++; + Boxsize--; + cout << "#1 i: " << i << ", j: " << j << endl; + + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + Boxsize++; + break; + } + else + { + Boxsize--; + } + } + + while(( i < rows-perimiter-1 && j == cols-perimiter-1) && Boxsize) + { + i++; + Boxsize--; + cout << "#2 i: " << i << ", j: " << j << endl; + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + Boxsize++; + break; + } + else + { + Boxsize--; + } + } + + while(( i == rows-perimiter-1 && j > 0+perimiter) && Boxsize) + { + j--; + Boxsize--; + cout << "#3 i: " << i << ", j: " << j << endl; + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + Boxsize++; + break; + } + else + { + Boxsize--; + } + } + + while(( i > 0+perimiter+1 && j == 0+perimiter) && Boxsize) + { + i--; + cout << "#4 i: " << i << ", j: " << j << endl; + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + Boxsize++; + break; + } + else + { + Boxsize--; + perimiter++; + } + } + } + myFirstPuzzle.printPuzzle(); +*/ + return myFirstPuzzle; +} + +//move i and j to position before +void retractOuterFirst(int& i, int& j, int cols, int rows, int perimiter) +{ + + if(( i == 0+perimiter && j <= cols-perimiter-1)) + { + j--; + } + + else if(( i <= rows-perimiter-1 && j == cols-perimiter-1)) + { + i--; + } + + else if(( i == rows-perimiter-1 && j >= 0+perimiter)) + { + j++; + } + + else if(( i >= 0+perimiter+1 && j == 0+perimiter)) + { + i++; + } + +} + diff --git a/TeamCMU/Revision_02/a.out b/Legacy/Revision_02/a.out similarity index 100% rename from TeamCMU/Revision_02/a.out rename to Legacy/Revision_02/a.out diff --git a/TeamCMU/Revision_02/main.cpp b/Legacy/Revision_02/main.cpp similarity index 96% rename from TeamCMU/Revision_02/main.cpp rename to Legacy/Revision_02/main.cpp index 185b92f..a489b16 100644 --- a/TeamCMU/Revision_02/main.cpp +++ b/Legacy/Revision_02/main.cpp @@ -1,305 +1,305 @@ -//Raphael Maenle - 11.11.2017 -#include -#include -#include -#include -#include -#include - -#define debug - -#include "puzzle.h" - -#include "test_puzzle.h" - -using namespace std; - -Puzzle solveOuterFirst( unsigned int rows, unsigned int cols, vector& myFirstBox); -void retractOuterFirst(int& i, int& j, int cols, int rows, int& perimiter); - -int main() -{ - srand(time(0)); - - vector part_array(NR_PARTS); - vector corners_array(NR_CORNERS); - vector edges_array(NR_EDGES); - vector inners_array(NR_INNERS); - - //randomBox myPuzzle(cols,rows); - //myPuzzle.createRandomPuzzle(); - - - unsigned int rows=5, cols=5; - - //vector myFirstBox = createBox(cols, rows); - - //create4040hardBox(myFirstBox); - /*myFirstBox[0].setConnections(0b01100010); - myFirstBox[1].setConnections(0b00010100); - myFirstBox[2].setConnections(0b00011010); - myFirstBox[3].setConnections(0b10000001); - myFirstBox[4].setConnections(0b00011000); - myFirstBox[5].setConnections(0b01100000);*/ - - Puzzle myFirstPuzzle(3,4); - PuzzlePiece myFirstPiece(1); - myFirstPiece.setConnections(0b00010100); - - if(myFirstPuzzle.PlaceOfPartGood(myFirstPiece)); - cout << "good" << endl; - - //printBox(myFirstBox); - cout << endl; - - //Puzzle newPuzzle = solveOuterFirst(cols, rows, myFirstBox); - return 0; -} - - -//rotates in snail form clockwise around board and tries placing puzzle pieces. -//if no piece fits in position it tries next piece of the piece before -Puzzle solveOuterFirst( unsigned int cols, unsigned int rows, vector& myFirstBox) -{ - int i = 0, j= 0, Boxsize = rows*cols, separator=0; - Puzzle myFirstPuzzle(cols, rows); - //first Piece - - - //rotate through puzzle - int perimiter; - int numberofsolutions=0; - int newPerimiter = 1; - for(perimiter = 0; /*perimiter <= (cols>rows?rows:cols)/2;*/;) - { - if(Boxsize) - { -#ifdef debug -cout << "perimiter: " << perimiter << endl; -#endif - } - else - { - break; - retractOuterFirst(i,j,cols,rows,perimiter); - Boxsize++; - separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); - numberofsolutions++; - } - - if((i==rows/2 && j==cols/2 )&& cols==rows) - { - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - Boxsize++; - separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); - } - else - { - break; - separator=0; - Boxsize--; - } - } - - - if((i==perimiter+1 && j==perimiter)) - { -#ifdef debug -cout << "#0 i: " << i << ", j: " << j << endl; -#endif - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - Boxsize++; - separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); -#ifdef debug -cout << "New Box: "; -printBox(myFirstBox); -cout << endl; -myFirstPuzzle.printPuzzle(); -cout << "Boxsize: " << Boxsize << endl; -cout << "separator: " << separator << endl; -#endif - } - else - { - perimiter=newPerimiter; - newPerimiter++; - j++; - separator=0; - Boxsize--; -#ifdef debug -cout << " Perimiter: " << perimiter << endl; -myFirstPuzzle.printPuzzle(); -#endif - } - - } - else - { - - - //cout << "general information i: " << i << ", j: " << j << endl; - while(( i == 0+perimiter && j < cols-perimiter-1) && Boxsize) - { -#ifdef debug -cout << "#1 i: " << i << ", j: " << j << endl; -#endif - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); - Boxsize++; -#ifdef debug -cout << "New Box: "; -printBox(myFirstBox); -cout << endl; -myFirstPuzzle.printPuzzle(); -cout << "Boxsize: " << Boxsize << endl; -cout << "separator: " << separator << endl; -#endif - break; - } - else - { - j++; - separator=0; - Boxsize--; -#ifdef debug -myFirstPuzzle.printPuzzle(); -#endif - } - } - while(( i < rows-perimiter-1 && j == cols-perimiter-1) && Boxsize) - { -#ifdef debug -cout << "#2 i: " << i << ", j: " << j << endl; -#endif - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - - separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); - Boxsize++; -#ifdef debug -cout << "New Box: "; -printBox(myFirstBox); -cout << endl; -myFirstPuzzle.printPuzzle(); - -cout << "Boxsize: " << Boxsize << endl; -cout << "separator: " << separator << endl; -#endif - break; - } - else - { - i++; - separator=0; - Boxsize--; -#ifdef debug -myFirstPuzzle.printPuzzle(); -#endif - } - } - - while(( i == rows-perimiter-1 && j > 0+perimiter) && Boxsize) - { - -#ifdef debug -cout << "#3 i: " << i << ", j: " << j << endl; -#endif - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); - Boxsize++; -#ifdef debug -cout << "New Box: "; -printBox(myFirstBox); -cout << endl; -myFirstPuzzle.printPuzzle(); -cout << "Boxsize: " << Boxsize << endl; -cout << "separator: " << separator << endl; -#endif - break; - } - else - { - j--; - separator=0; - Boxsize--; -#ifdef debug -myFirstPuzzle.printPuzzle(); -#endif - } - } - - while(( i > 0+perimiter+1 && j == 0+perimiter) && Boxsize) - { -#ifdef debug -cout << "#4 i: " << i << ", j: " << j << endl; -#endif - if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) - { - retractOuterFirst(i,j,cols,rows,perimiter); - separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); - Boxsize++; -#ifdef debug -cout << "New Box: "; -printBox(myFirstBox); -cout << endl; -myFirstPuzzle.printPuzzle(); - -cout << "Boxsize: " << Boxsize << endl; -cout << "separator: " << separator << endl; -#endif - break; - } - else - { - i--; - separator=0; - Boxsize--; -#ifdef debug -myFirstPuzzle.printPuzzle(); -#endif - } - } - } - } - myFirstPuzzle.printPuzzle(); - - return myFirstPuzzle; -} - -//move i and j to position before -void retractOuterFirst(int& i, int& j, int cols, int rows, int& perimiter) -{ -#ifdef debug - cout << "retracting: i=" << i << " j=" << j << endl; -#endif - if(( i == 0+perimiter && j <= cols-perimiter-1)) - { - j--; - } - else if(( i <= rows-perimiter-1 && j == cols-perimiter-1)) - { - i--; - } - - else if(( i == rows-perimiter-1 && j >= 0+perimiter)) - { - j++; - } - - else if(( i >= 0+perimiter+1 && j == 0+perimiter)) - { - i++; - } -#ifdef debug - cout << "to: i=" << i << " j=" << j << endl; -#endif +//Raphael Maenle - 11.11.2017 +#include +#include +#include +#include +#include +#include + +#define debug + +#include "puzzle.h" + +#include "test_puzzle.h" + +using namespace std; + +Puzzle solveOuterFirst( unsigned int rows, unsigned int cols, vector& myFirstBox); +void retractOuterFirst(int& i, int& j, int cols, int rows, int& perimiter); + +int main() +{ + srand(time(0)); + + vector part_array(NR_PARTS); + vector corners_array(NR_CORNERS); + vector edges_array(NR_EDGES); + vector inners_array(NR_INNERS); + + //randomBox myPuzzle(cols,rows); + //myPuzzle.createRandomPuzzle(); + + + unsigned int rows=5, cols=5; + + //vector myFirstBox = createBox(cols, rows); + + //create4040hardBox(myFirstBox); + /*myFirstBox[0].setConnections(0b01100010); + myFirstBox[1].setConnections(0b00010100); + myFirstBox[2].setConnections(0b00011010); + myFirstBox[3].setConnections(0b10000001); + myFirstBox[4].setConnections(0b00011000); + myFirstBox[5].setConnections(0b01100000);*/ + + Puzzle myFirstPuzzle(3,4); + PuzzlePiece myFirstPiece(1); + myFirstPiece.setConnections(0b00010100); + + if(myFirstPuzzle.PlaceOfPartGood(myFirstPiece)); + cout << "good" << endl; + + //printBox(myFirstBox); + cout << endl; + + //Puzzle newPuzzle = solveOuterFirst(cols, rows, myFirstBox); + return 0; +} + + +//rotates in snail form clockwise around board and tries placing puzzle pieces. +//if no piece fits in position it tries next piece of the piece before +Puzzle solveOuterFirst( unsigned int cols, unsigned int rows, vector& myFirstBox) +{ + int i = 0, j= 0, Boxsize = rows*cols, separator=0; + Puzzle myFirstPuzzle(cols, rows); + //first Piece + + + //rotate through puzzle + int perimiter; + int numberofsolutions=0; + int newPerimiter = 1; + for(perimiter = 0; /*perimiter <= (cols>rows?rows:cols)/2;*/;) + { + if(Boxsize) + { +#ifdef debug +cout << "perimiter: " << perimiter << endl; +#endif + } + else + { + break; + retractOuterFirst(i,j,cols,rows,perimiter); + Boxsize++; + separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); + numberofsolutions++; + } + + if((i==rows/2 && j==cols/2 )&& cols==rows) + { + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + Boxsize++; + separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); + } + else + { + break; + separator=0; + Boxsize--; + } + } + + + if((i==perimiter+1 && j==perimiter)) + { +#ifdef debug +cout << "#0 i: " << i << ", j: " << j << endl; +#endif + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + Boxsize++; + separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); +#ifdef debug +cout << "New Box: "; +printBox(myFirstBox); +cout << endl; +myFirstPuzzle.printPuzzle(); +cout << "Boxsize: " << Boxsize << endl; +cout << "separator: " << separator << endl; +#endif + } + else + { + perimiter=newPerimiter; + newPerimiter++; + j++; + separator=0; + Boxsize--; +#ifdef debug +cout << " Perimiter: " << perimiter << endl; +myFirstPuzzle.printPuzzle(); +#endif + } + + } + else + { + + + //cout << "general information i: " << i << ", j: " << j << endl; + while(( i == 0+perimiter && j < cols-perimiter-1) && Boxsize) + { +#ifdef debug +cout << "#1 i: " << i << ", j: " << j << endl; +#endif + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); + Boxsize++; +#ifdef debug +cout << "New Box: "; +printBox(myFirstBox); +cout << endl; +myFirstPuzzle.printPuzzle(); +cout << "Boxsize: " << Boxsize << endl; +cout << "separator: " << separator << endl; +#endif + break; + } + else + { + j++; + separator=0; + Boxsize--; +#ifdef debug +myFirstPuzzle.printPuzzle(); +#endif + } + } + while(( i < rows-perimiter-1 && j == cols-perimiter-1) && Boxsize) + { +#ifdef debug +cout << "#2 i: " << i << ", j: " << j << endl; +#endif + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + + separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); + Boxsize++; +#ifdef debug +cout << "New Box: "; +printBox(myFirstBox); +cout << endl; +myFirstPuzzle.printPuzzle(); + +cout << "Boxsize: " << Boxsize << endl; +cout << "separator: " << separator << endl; +#endif + break; + } + else + { + i++; + separator=0; + Boxsize--; +#ifdef debug +myFirstPuzzle.printPuzzle(); +#endif + } + } + + while(( i == rows-perimiter-1 && j > 0+perimiter) && Boxsize) + { + +#ifdef debug +cout << "#3 i: " << i << ", j: " << j << endl; +#endif + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); + Boxsize++; +#ifdef debug +cout << "New Box: "; +printBox(myFirstBox); +cout << endl; +myFirstPuzzle.printPuzzle(); +cout << "Boxsize: " << Boxsize << endl; +cout << "separator: " << separator << endl; +#endif + break; + } + else + { + j--; + separator=0; + Boxsize--; +#ifdef debug +myFirstPuzzle.printPuzzle(); +#endif + } + } + + while(( i > 0+perimiter+1 && j == 0+perimiter) && Boxsize) + { +#ifdef debug +cout << "#4 i: " << i << ", j: " << j << endl; +#endif + if(myFirstPuzzle.tryAllPieces(j, i, myFirstBox,separator) == -1) + { + retractOuterFirst(i,j,cols,rows,perimiter); + separator = myFirstPuzzle.putBackIntoBox(j, i, myFirstBox); + Boxsize++; +#ifdef debug +cout << "New Box: "; +printBox(myFirstBox); +cout << endl; +myFirstPuzzle.printPuzzle(); + +cout << "Boxsize: " << Boxsize << endl; +cout << "separator: " << separator << endl; +#endif + break; + } + else + { + i--; + separator=0; + Boxsize--; +#ifdef debug +myFirstPuzzle.printPuzzle(); +#endif + } + } + } + } + myFirstPuzzle.printPuzzle(); + + return myFirstPuzzle; +} + +//move i and j to position before +void retractOuterFirst(int& i, int& j, int cols, int rows, int& perimiter) +{ +#ifdef debug + cout << "retracting: i=" << i << " j=" << j << endl; +#endif + if(( i == 0+perimiter && j <= cols-perimiter-1)) + { + j--; + } + else if(( i <= rows-perimiter-1 && j == cols-perimiter-1)) + { + i--; + } + + else if(( i == rows-perimiter-1 && j >= 0+perimiter)) + { + j++; + } + + else if(( i >= 0+perimiter+1 && j == 0+perimiter)) + { + i++; + } +#ifdef debug + cout << "to: i=" << i << " j=" << j << endl; +#endif } \ No newline at end of file diff --git a/TeamCMU/Revision_02/puzzle.h b/Legacy/Revision_02/puzzle.h similarity index 97% rename from TeamCMU/Revision_02/puzzle.h rename to Legacy/Revision_02/puzzle.h index 2b69445..85a7f65 100644 --- a/TeamCMU/Revision_02/puzzle.h +++ b/Legacy/Revision_02/puzzle.h @@ -1,469 +1,469 @@ -#include - -#define NR_PARTS 1008 -#define NR_CORNERS 4 -#define NR_EDGES 120 -#define NR_INNERS 884 - -using namespace std; - -//part from group header file -class Part -{ -public: - Part(): connections(0){} - ~Part() {} - uint8_t getConnections() const - { - return connections; - } - void setConnections(uint8_t newconnections) - { - connections = newconnections; - } - -private: - uint8_t connections; -}; - -//puzzlepiece extens part with essential identifiers and functions -class PuzzlePiece: public Part -{ -public: - - PuzzlePiece(unsigned int flag = 0) - { - shifts=0; - boxidentifier=-1; - switch(flag) - { - case 0: - setConnections(0b00000000); - break; - case 1: - setConnections(0b11111111); - break; - case 3: - randomCenterPiece(); - break; - } - } - - void shift(unsigned int moves); - void randomCenterPiece(); - void printPiece() { cout << bitset (getConnections()); } - - void setBoxIdentifier(int new_boxid) { boxidentifier = new_boxid; } - int getBoxIdentifier() { return boxidentifier; } - void assignIdentifier() { identifier = idcount;idcount++; } - unsigned int getIdentifier() { return identifier;} - -private: - unsigned int shifts; - unsigned int boxidentifier; - unsigned int identifier; - static unsigned int idcount; -}; - -unsigned int PuzzlePiece::idcount(0); - -class Puzzle -{ - friend class randomBox; -public: - //constructor creates matrix with 00 outside and 11 inside - Puzzle(uint m = 7, uint n = 4): col(m), row(n) - { - Matrix = new PuzzlePiece* [n+2]; - for(int i = 0;i& myBox, unsigned int separator); - unsigned int putBackIntoBox(unsigned int m, unsigned int n, vector& myBox); - - -private: - uint row; - uint col; - - PuzzlePiece** Matrix; - -}; - -//use this for random puzzle creation -class randomBox: public Puzzle -{ -public: - - randomBox(unsigned int m, unsigned int n) : Puzzle(m,n) {} //passed m n to puzzle constructor - - void createRandomPuzzle(); - vector shuffle(); - void printBox(); - -private: - vector Box; - -}; - -//functiondefinitions -void printBox(vector myBox); -vector createBox(uint m, uint n); -void numerateBox(vector& myBox); - -//functions - -//shifts puzzle piece one to the right -void PuzzlePiece::shift(unsigned int moves) -{ - shifts = (shifts+moves)%4; - setConnections(((getConnections() >> (moves*2)) | (getConnections() << sizeof(unsigned char)*8 - (moves*2)))); -} - -//creates random centerpiece -void PuzzlePiece::randomCenterPiece() -{ - setConnections(0b00000000); - - if(rand()%2) - setConnections(getConnections() | 0b01000000); - else - setConnections(getConnections() | 0b10000000); - - if(rand()%2) - setConnections(getConnections() | 0b00010000); - else - setConnections(getConnections() | 0b00100000); - - if(rand()%2) - setConnections(getConnections() | 0b00000100); - else - setConnections(getConnections() | 0b00001000); - - if(rand()%2) - setConnections(getConnections() | 0b00000001); - else - setConnections(getConnections() | 0b00000010); -} - -//tries all pieces in box from separator to end and places fitting into matrix. removes fitting piece -//use separator if you have to retract to a position -//seperator may be bigger than box size, if all puzzle pieces have already been looked at. -// it immediately retracts again then (returns -1) -unsigned int Puzzle::tryAllPieces(unsigned int m, unsigned int n, vector& myBox, unsigned int separator) -{ - for(int i=separator; i& myBox) -{ -#ifdef debug -cout << "putting back" << endl; -cout << "Old Box: "; -printBox(myBox); -cout << endl; -#endif - for(int i = 0; i < myBox.size();i++) - { - if(myBox[i].getBoxIdentifier()>getPiece(m,n).getBoxIdentifier()) - { - myBox.insert(myBox.begin()+i,getPiece(m,n)); - removePiece(m,n); - return i+1; - } - } - //using push back, if the element was the last element in the vector chain - myBox.push_back(getPiece(m,n)); - removePiece(m,n); - return myBox.size(); -} - -//checks if the myPart in its current orientation is legal in position m, n -bool Puzzle::PlaceOfPartGood(unsigned int m,unsigned int n, PuzzlePiece& myPart) -{ - - PuzzlePiece negativePart(0); - - negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n+1).getConnections() & 0b11000000)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m-1,n).getConnections() & 0b00110000)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n-1).getConnections() & 0b00001100)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m+1,n).getConnections() & 0b00000011)); - negativePart.shift(2); - - - - if ( - ( ((((negativePart.getConnections() & 0b11000000) ^ (myPart.getConnections() & 0b11000000)) != 0b00000000) && (((myPart.getConnections() & 0b11000000) != 0b00000000) && (negativePart.getConnections() & 0b11000000) != 0b00000000)) - || ((((negativePart.getConnections() & 0b11000000) == 0b11000000) || ((myPart.getConnections() & 0b11000000) == 0b11000000)) && (( myPart.getConnections() & 0b11000000) != 0b00000000) && (negativePart.getConnections() & 0b11000000) != 0b00000000) - || (((negativePart.getConnections() & 0b11000000) == 0b00000000) && ((myPart.getConnections() & 0b11000000) == 0b00000000)) ) - && - ( ((((negativePart.getConnections() & 0b00110000) ^ (myPart.getConnections() & 0b00110000)) != 0b00000000) && (((myPart.getConnections() & 0b00110000) != 0b00000000) && (negativePart.getConnections() & 0b00110000) != 0b00000000)) - || ((((negativePart.getConnections() & 0b00110000) == 0b00110000) || ((myPart.getConnections() & 0b00110000) == 0b00110000)) && (((myPart.getConnections() & 0b00110000) != 0b00000000) && (negativePart.getConnections() & 0b00110000) != 0b00000000)) - || (((negativePart.getConnections() & 0b00110000) == 0b00000000) && ((myPart.getConnections() & 0b00110000) == 0b00000000)) ) - && - ( ((((negativePart.getConnections() & 0b00001100) ^ (myPart.getConnections() & 0b00001100)) != 0b00000000) && (((myPart.getConnections() & 0b00001100) != 0b00000000) && (negativePart.getConnections() & 0b00001100) != 0b00000000)) - || ((((negativePart.getConnections() & 0b00001100) == 0b00001100) || ((myPart.getConnections() & 0b00001100) == 0b00001100)) && (((myPart.getConnections() & 0b00001100) != 0b00000000) && (negativePart.getConnections() & 0b00001100) != 0b00000000)) - || (((negativePart.getConnections() & 0b00001100) == 0b00000000) && ((myPart.getConnections() & 0b00001100) == 0b00000000)) ) - && - ( ((((negativePart.getConnections() & 0b00000011) ^ (myPart.getConnections() & 0b00000011)) != 0b00000000) && (((myPart.getConnections() & 0b00000011) != 0b00000000) && (negativePart.getConnections() & 0b00000011) != 0b00000000)) - || ((((negativePart.getConnections() & 0b00000011) == 0b00000011) || ((myPart.getConnections() & 0b00000011) == 0b00000011)) && (((myPart.getConnections() & 0b00000011) != 0b00000000) && (negativePart.getConnections() & 0b00000011) != 0b00000000)) - || (((negativePart.getConnections() & 0b00000011) == 0b00000000) && ((myPart.getConnections() & 0b00000011) == 0b00000000)) ) - ) - { -#ifdef debug -cout << "good Part: "; -myPart.printPiece(); -cout << endl; -#endif - return 1; - } - - - - return 0; -} - - -//TODO!! -//simpler algorithm to the first placeofpartgood -//not yet functional!!! -bool Puzzle::PlaceOfPart2Good(unsigned int m,unsigned int n, PuzzlePiece& myPart) -{ - /* - - PuzzlePiece negativePart(0); - - negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n+1).getConnections() & 0b11000000)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m-1,n).getConnections() & 0b00110000)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n-1).getConnections() & 0b00001100)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m+1,n).getConnections() & 0b00000011)); - negativePart.shift(2); - - //A and D or B and C or not A and not B and not C and not D - - if ( - ( ( (negativePart.getConnections() & 0b10000000) & (myPart.getConnections() & 0b01000000)) - || ( (negativePart.getConnections() & 0b01000000) & (myPart.getConnections() & 0b10000000)) - || ((!(negativePart.getConnections() & 0b10000000) & !(myPart.getConnections() & 0b10000000)) & (!(negativePart.getConnections() & 0b01000000) & !(myPart.getConnections() & 0b01000000))) - ) - && - ( ( (negativePart.getConnections() & 0b00100000) & (myPart.getConnections() & 0b00010000)) - || ( (negativePart.getConnections() & 0b00010000) & (myPart.getConnections() & 0b00100000)) - || ((!(negativePart.getConnections() & 0b00100000) & !(myPart.getConnections() & 0b00100000)) & (!(negativePart.getConnections() & 0b00010000) & !(myPart.getConnections() & 0b00010000))) - ) - && - ( ( (negativePart.getConnections() & 0b00001000) & (myPart.getConnections() & 0b00000100)) - || ( (negativePart.getConnections() & 0b00000100) & (myPart.getConnections() & 0b00001000)) - || ((!(negativePart.getConnections() & 0b00001000) & !(myPart.getConnections() & 0b00001000)) & (!(negativePart.getConnections() & 0b00000100) & !(myPart.getConnections() & 0b00000100))) - ) - && - ( ( (negativePart.getConnections() & 0b00000010) & (myPart.getConnections() & 0b00000001)) - || ( (negativePart.getConnections() & 0b00000001) & (myPart.getConnections() & 0b00000010)) - || ((!(negativePart.getConnections() & 0b00000010) & !(myPart.getConnections() & 0b00000010)) & (!(negativePart.getConnections() & 0b00000001) & !(myPart.getConnections() & 0b00000001))) - ) - ) - - return 1; - - cout << "nogood" << endl; - return 0; - */ - - PuzzlePiece tmpPuzzlePiece = myPart; - - //make tmp a negativ part - if((tmpPuzzlePiece.Ringbuffer & 0b11000000) != 192 || 0) - tmpPuzzlePiece.Ringbuffer = (tmpPuzzlePiece.Ringbuffer ^ 0b11000000); - if((tmpPuzzlePiece.Ringbuffer & 0b00110000) != 48 || 0) - tmpPuzzlePiece.Ringbuffer = (tmpPuzzlePiece.Ringbuffer ^ 0b00110000); - if((tmpPuzzlePiece.Ringbuffer & 0b00001100) != 12 || 0) - tmpPuzzlePiece.Ringbuffer = (tmpPuzzlePiece.Ringbuffer ^ 0b00001100); - if((tmpPuzzlePiece.Ringbuffer & 0b00000011) != 3 || 0) - tmpPuzzlePiece.Ringbuffer = (tmpPuzzlePiece.Ringbuffer ^ 0b00000011); - - PuzzlePiece negativePart(0); - - negativePart.Ringbuffer = negativePart.Ringbuffer | (this->sudogetPiece(m,n+1).Ringbuffer & 0b11000000); - negativePart.Ringbuffer = negativePart.Ringbuffer | (this->sudogetPiece(m-1,n).Ringbuffer & 0b00110000); - negativePart.Ringbuffer = negativePart.Ringbuffer | (this->sudogetPiece(m,n-1).Ringbuffer & 0b00001100); - negativePart.Ringbuffer = negativePart.Ringbuffer | (this->sudogetPiece(m+1,n).Ringbuffer & 0b00000011); - - negativePart.Shift(2); - - //check tmp part with environment - if(((negativePart.Ringbuffer & 0b11000000) == (tmpPuzzlePiece & 0b11000000)) && ((negativePart.Ringbuffer & 0b00110000) == (tmpPuzzlePiece & 0b00110000)) - && ((negativePart.Ringbuffer & 0b00001100) == (tmpPuzzlePiece & 0b00001100)) && ((negativePart.Ringbuffer & 0b00000011) == (tmpPuzzlePiece & 0b00000011))) - return 1; - - return 0; -} - -//prints the true puzzle (without 0 edges) -void Puzzle::printPuzzle() -{ - cout << "current Puzzle: " << endl; - for(int i=1;i::iterator i = Box.begin(); i != Box.end(); i++) - { - (*i).printPiece(); - cout << ' '; - } - cout << endl; -} - -//shuffles around a box, randomizing pieces and orientation -vector randomBox::shuffle() -{ - random_shuffle(Box.begin(),Box.end()); - for (vector::iterator i = Box.begin(); i != Box.end(); i++) - (*i).shift(rand()%4); - numerateBox(Box); - return Box; -} - -//creates a random box size m, n, shuffles it, and then retuns it -vector createBox(uint m, uint n) -{ - randomBox myFirstPuzzleBox(m,n); - myFirstPuzzleBox.createRandomPuzzle(); - return myFirstPuzzleBox.shuffle(); -} - -//prints contents of box -void printBox(vector myBox) -{ - cout << "current Box: " << endl; - for (vector::iterator i = myBox.begin(); i != myBox.end(); i++) - { - (*i).printPiece(); - cout << ' '; - } - cout << endl; - return; -} - -//gives every element in box a box identifier. -void numerateBox(vector& myBox) -{ - for(int i = 0; i< myBox.size();i++) - myBox[i].setBoxIdentifier(i); - - return; +#include + +#define NR_PARTS 1008 +#define NR_CORNERS 4 +#define NR_EDGES 120 +#define NR_INNERS 884 + +using namespace std; + +//part from group header file +class Part +{ +public: + Part(): connections(0){} + ~Part() {} + uint8_t getConnections() const + { + return connections; + } + void setConnections(uint8_t newconnections) + { + connections = newconnections; + } + +private: + uint8_t connections; +}; + +//puzzlepiece extens part with essential identifiers and functions +class PuzzlePiece: public Part +{ +public: + + PuzzlePiece(unsigned int flag = 0) + { + shifts=0; + boxidentifier=-1; + switch(flag) + { + case 0: + setConnections(0b00000000); + break; + case 1: + setConnections(0b11111111); + break; + case 3: + randomCenterPiece(); + break; + } + } + + void shift(unsigned int moves); + void randomCenterPiece(); + void printPiece() { cout << bitset (getConnections()); } + + void setBoxIdentifier(int new_boxid) { boxidentifier = new_boxid; } + int getBoxIdentifier() { return boxidentifier; } + void assignIdentifier() { identifier = idcount;idcount++; } + unsigned int getIdentifier() { return identifier;} + +private: + unsigned int shifts; + unsigned int boxidentifier; + unsigned int identifier; + static unsigned int idcount; +}; + +unsigned int PuzzlePiece::idcount(0); + +class Puzzle +{ + friend class randomBox; +public: + //constructor creates matrix with 00 outside and 11 inside + Puzzle(uint m = 7, uint n = 4): col(m), row(n) + { + Matrix = new PuzzlePiece* [n+2]; + for(int i = 0;i& myBox, unsigned int separator); + unsigned int putBackIntoBox(unsigned int m, unsigned int n, vector& myBox); + + +private: + uint row; + uint col; + + PuzzlePiece** Matrix; + +}; + +//use this for random puzzle creation +class randomBox: public Puzzle +{ +public: + + randomBox(unsigned int m, unsigned int n) : Puzzle(m,n) {} //passed m n to puzzle constructor + + void createRandomPuzzle(); + vector shuffle(); + void printBox(); + +private: + vector Box; + +}; + +//functiondefinitions +void printBox(vector myBox); +vector createBox(uint m, uint n); +void numerateBox(vector& myBox); + +//functions + +//shifts puzzle piece one to the right +void PuzzlePiece::shift(unsigned int moves) +{ + shifts = (shifts+moves)%4; + setConnections(((getConnections() >> (moves*2)) | (getConnections() << sizeof(unsigned char)*8 - (moves*2)))); +} + +//creates random centerpiece +void PuzzlePiece::randomCenterPiece() +{ + setConnections(0b00000000); + + if(rand()%2) + setConnections(getConnections() | 0b01000000); + else + setConnections(getConnections() | 0b10000000); + + if(rand()%2) + setConnections(getConnections() | 0b00010000); + else + setConnections(getConnections() | 0b00100000); + + if(rand()%2) + setConnections(getConnections() | 0b00000100); + else + setConnections(getConnections() | 0b00001000); + + if(rand()%2) + setConnections(getConnections() | 0b00000001); + else + setConnections(getConnections() | 0b00000010); +} + +//tries all pieces in box from separator to end and places fitting into matrix. removes fitting piece +//use separator if you have to retract to a position +//seperator may be bigger than box size, if all puzzle pieces have already been looked at. +// it immediately retracts again then (returns -1) +unsigned int Puzzle::tryAllPieces(unsigned int m, unsigned int n, vector& myBox, unsigned int separator) +{ + for(int i=separator; i& myBox) +{ +#ifdef debug +cout << "putting back" << endl; +cout << "Old Box: "; +printBox(myBox); +cout << endl; +#endif + for(int i = 0; i < myBox.size();i++) + { + if(myBox[i].getBoxIdentifier()>getPiece(m,n).getBoxIdentifier()) + { + myBox.insert(myBox.begin()+i,getPiece(m,n)); + removePiece(m,n); + return i+1; + } + } + //using push back, if the element was the last element in the vector chain + myBox.push_back(getPiece(m,n)); + removePiece(m,n); + return myBox.size(); +} + +//checks if the myPart in its current orientation is legal in position m, n +bool Puzzle::PlaceOfPartGood(unsigned int m,unsigned int n, PuzzlePiece& myPart) +{ + + PuzzlePiece negativePart(0); + + negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n+1).getConnections() & 0b11000000)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m-1,n).getConnections() & 0b00110000)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n-1).getConnections() & 0b00001100)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m+1,n).getConnections() & 0b00000011)); + negativePart.shift(2); + + + + if ( + ( ((((negativePart.getConnections() & 0b11000000) ^ (myPart.getConnections() & 0b11000000)) != 0b00000000) && (((myPart.getConnections() & 0b11000000) != 0b00000000) && (negativePart.getConnections() & 0b11000000) != 0b00000000)) + || ((((negativePart.getConnections() & 0b11000000) == 0b11000000) || ((myPart.getConnections() & 0b11000000) == 0b11000000)) && (( myPart.getConnections() & 0b11000000) != 0b00000000) && (negativePart.getConnections() & 0b11000000) != 0b00000000) + || (((negativePart.getConnections() & 0b11000000) == 0b00000000) && ((myPart.getConnections() & 0b11000000) == 0b00000000)) ) + && + ( ((((negativePart.getConnections() & 0b00110000) ^ (myPart.getConnections() & 0b00110000)) != 0b00000000) && (((myPart.getConnections() & 0b00110000) != 0b00000000) && (negativePart.getConnections() & 0b00110000) != 0b00000000)) + || ((((negativePart.getConnections() & 0b00110000) == 0b00110000) || ((myPart.getConnections() & 0b00110000) == 0b00110000)) && (((myPart.getConnections() & 0b00110000) != 0b00000000) && (negativePart.getConnections() & 0b00110000) != 0b00000000)) + || (((negativePart.getConnections() & 0b00110000) == 0b00000000) && ((myPart.getConnections() & 0b00110000) == 0b00000000)) ) + && + ( ((((negativePart.getConnections() & 0b00001100) ^ (myPart.getConnections() & 0b00001100)) != 0b00000000) && (((myPart.getConnections() & 0b00001100) != 0b00000000) && (negativePart.getConnections() & 0b00001100) != 0b00000000)) + || ((((negativePart.getConnections() & 0b00001100) == 0b00001100) || ((myPart.getConnections() & 0b00001100) == 0b00001100)) && (((myPart.getConnections() & 0b00001100) != 0b00000000) && (negativePart.getConnections() & 0b00001100) != 0b00000000)) + || (((negativePart.getConnections() & 0b00001100) == 0b00000000) && ((myPart.getConnections() & 0b00001100) == 0b00000000)) ) + && + ( ((((negativePart.getConnections() & 0b00000011) ^ (myPart.getConnections() & 0b00000011)) != 0b00000000) && (((myPart.getConnections() & 0b00000011) != 0b00000000) && (negativePart.getConnections() & 0b00000011) != 0b00000000)) + || ((((negativePart.getConnections() & 0b00000011) == 0b00000011) || ((myPart.getConnections() & 0b00000011) == 0b00000011)) && (((myPart.getConnections() & 0b00000011) != 0b00000000) && (negativePart.getConnections() & 0b00000011) != 0b00000000)) + || (((negativePart.getConnections() & 0b00000011) == 0b00000000) && ((myPart.getConnections() & 0b00000011) == 0b00000000)) ) + ) + { +#ifdef debug +cout << "good Part: "; +myPart.printPiece(); +cout << endl; +#endif + return 1; + } + + + + return 0; +} + + +//TODO!! +//simpler algorithm to the first placeofpartgood +//not yet functional!!! +bool Puzzle::PlaceOfPart2Good(unsigned int m,unsigned int n, PuzzlePiece& myPart) +{ + /* + + PuzzlePiece negativePart(0); + + negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n+1).getConnections() & 0b11000000)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m-1,n).getConnections() & 0b00110000)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n-1).getConnections() & 0b00001100)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m+1,n).getConnections() & 0b00000011)); + negativePart.shift(2); + + //A and D or B and C or not A and not B and not C and not D + + if ( + ( ( (negativePart.getConnections() & 0b10000000) & (myPart.getConnections() & 0b01000000)) + || ( (negativePart.getConnections() & 0b01000000) & (myPart.getConnections() & 0b10000000)) + || ((!(negativePart.getConnections() & 0b10000000) & !(myPart.getConnections() & 0b10000000)) & (!(negativePart.getConnections() & 0b01000000) & !(myPart.getConnections() & 0b01000000))) + ) + && + ( ( (negativePart.getConnections() & 0b00100000) & (myPart.getConnections() & 0b00010000)) + || ( (negativePart.getConnections() & 0b00010000) & (myPart.getConnections() & 0b00100000)) + || ((!(negativePart.getConnections() & 0b00100000) & !(myPart.getConnections() & 0b00100000)) & (!(negativePart.getConnections() & 0b00010000) & !(myPart.getConnections() & 0b00010000))) + ) + && + ( ( (negativePart.getConnections() & 0b00001000) & (myPart.getConnections() & 0b00000100)) + || ( (negativePart.getConnections() & 0b00000100) & (myPart.getConnections() & 0b00001000)) + || ((!(negativePart.getConnections() & 0b00001000) & !(myPart.getConnections() & 0b00001000)) & (!(negativePart.getConnections() & 0b00000100) & !(myPart.getConnections() & 0b00000100))) + ) + && + ( ( (negativePart.getConnections() & 0b00000010) & (myPart.getConnections() & 0b00000001)) + || ( (negativePart.getConnections() & 0b00000001) & (myPart.getConnections() & 0b00000010)) + || ((!(negativePart.getConnections() & 0b00000010) & !(myPart.getConnections() & 0b00000010)) & (!(negativePart.getConnections() & 0b00000001) & !(myPart.getConnections() & 0b00000001))) + ) + ) + + return 1; + + cout << "nogood" << endl; + return 0; + */ + + PuzzlePiece tmpPuzzlePiece = myPart; + + //make tmp a negativ part + if((tmpPuzzlePiece.Ringbuffer & 0b11000000) != 192 || 0) + tmpPuzzlePiece.Ringbuffer = (tmpPuzzlePiece.Ringbuffer ^ 0b11000000); + if((tmpPuzzlePiece.Ringbuffer & 0b00110000) != 48 || 0) + tmpPuzzlePiece.Ringbuffer = (tmpPuzzlePiece.Ringbuffer ^ 0b00110000); + if((tmpPuzzlePiece.Ringbuffer & 0b00001100) != 12 || 0) + tmpPuzzlePiece.Ringbuffer = (tmpPuzzlePiece.Ringbuffer ^ 0b00001100); + if((tmpPuzzlePiece.Ringbuffer & 0b00000011) != 3 || 0) + tmpPuzzlePiece.Ringbuffer = (tmpPuzzlePiece.Ringbuffer ^ 0b00000011); + + PuzzlePiece negativePart(0); + + negativePart.Ringbuffer = negativePart.Ringbuffer | (this->sudogetPiece(m,n+1).Ringbuffer & 0b11000000); + negativePart.Ringbuffer = negativePart.Ringbuffer | (this->sudogetPiece(m-1,n).Ringbuffer & 0b00110000); + negativePart.Ringbuffer = negativePart.Ringbuffer | (this->sudogetPiece(m,n-1).Ringbuffer & 0b00001100); + negativePart.Ringbuffer = negativePart.Ringbuffer | (this->sudogetPiece(m+1,n).Ringbuffer & 0b00000011); + + negativePart.Shift(2); + + //check tmp part with environment + if(((negativePart.Ringbuffer & 0b11000000) == (tmpPuzzlePiece & 0b11000000)) && ((negativePart.Ringbuffer & 0b00110000) == (tmpPuzzlePiece & 0b00110000)) + && ((negativePart.Ringbuffer & 0b00001100) == (tmpPuzzlePiece & 0b00001100)) && ((negativePart.Ringbuffer & 0b00000011) == (tmpPuzzlePiece & 0b00000011))) + return 1; + + return 0; +} + +//prints the true puzzle (without 0 edges) +void Puzzle::printPuzzle() +{ + cout << "current Puzzle: " << endl; + for(int i=1;i::iterator i = Box.begin(); i != Box.end(); i++) + { + (*i).printPiece(); + cout << ' '; + } + cout << endl; +} + +//shuffles around a box, randomizing pieces and orientation +vector randomBox::shuffle() +{ + random_shuffle(Box.begin(),Box.end()); + for (vector::iterator i = Box.begin(); i != Box.end(); i++) + (*i).shift(rand()%4); + numerateBox(Box); + return Box; +} + +//creates a random box size m, n, shuffles it, and then retuns it +vector createBox(uint m, uint n) +{ + randomBox myFirstPuzzleBox(m,n); + myFirstPuzzleBox.createRandomPuzzle(); + return myFirstPuzzleBox.shuffle(); +} + +//prints contents of box +void printBox(vector myBox) +{ + cout << "current Box: " << endl; + for (vector::iterator i = myBox.begin(); i != myBox.end(); i++) + { + (*i).printPiece(); + cout << ' '; + } + cout << endl; + return; +} + +//gives every element in box a box identifier. +void numerateBox(vector& myBox) +{ + for(int i = 0; i< myBox.size();i++) + myBox[i].setBoxIdentifier(i); + + return; } \ No newline at end of file diff --git a/TeamCMU/Revision_03/test_puzzle.h b/Legacy/Revision_02/test_puzzle.h similarity index 97% rename from TeamCMU/Revision_03/test_puzzle.h rename to Legacy/Revision_02/test_puzzle.h index f893bf0..e7c1c1c 100644 --- a/TeamCMU/Revision_03/test_puzzle.h +++ b/Legacy/Revision_02/test_puzzle.h @@ -1,406 +1,406 @@ - - void create4040hardBox(vector& myFirstBox) -{ -myFirstBox[0].setConnections(0b01101001); -myFirstBox[1].setConnections(0b10011001); -myFirstBox[2].setConnections(0b01100110); -myFirstBox[3].setConnections(0b01101001); -myFirstBox[4].setConnections(0b10100101); -myFirstBox[5].setConnections(0b10010010); -myFirstBox[6].setConnections(0b01101001); -myFirstBox[7].setConnections(0b00101010); -myFirstBox[8].setConnections(0b01000110); -myFirstBox[9].setConnections(0b01011010); -myFirstBox[10].setConnections(0b01011010); -myFirstBox[11].setConnections(0b10010101); -myFirstBox[12].setConnections(0b01010101); -myFirstBox[13].setConnections(0b10101001); -myFirstBox[14].setConnections(0b10010101); -myFirstBox[15].setConnections(0b10101010); -myFirstBox[16].setConnections(0b01101010); -myFirstBox[17].setConnections(0b01101010); -myFirstBox[18].setConnections(0b00100101); -myFirstBox[19].setConnections(0b01100101); -myFirstBox[20].setConnections(0b10010001); -myFirstBox[21].setConnections(0b10010101); -myFirstBox[22].setConnections(0b10101001); -myFirstBox[23].setConnections(0b01010110); -myFirstBox[24].setConnections(0b10101010); -myFirstBox[25].setConnections(0b01101000); -myFirstBox[26].setConnections(0b01101010); -myFirstBox[27].setConnections(0b10010101); -myFirstBox[28].setConnections(0b10011010); -myFirstBox[29].setConnections(0b10011001); -myFirstBox[30].setConnections(0b01101010); -myFirstBox[31].setConnections(0b01100001); -myFirstBox[32].setConnections(0b01101010); -myFirstBox[33].setConnections(0b01100101); -myFirstBox[34].setConnections(0b01010101); -myFirstBox[35].setConnections(0b01010110); -myFirstBox[36].setConnections(0b01101010); -myFirstBox[37].setConnections(0b01010110); -myFirstBox[38].setConnections(0b01100110); -myFirstBox[39].setConnections(0b01011010); -myFirstBox[40].setConnections(0b01100101); -myFirstBox[41].setConnections(0b01101001); -myFirstBox[42].setConnections(0b01010110); -myFirstBox[43].setConnections(0b01000110); -myFirstBox[44].setConnections(0b01011001); -myFirstBox[45].setConnections(0b01101001); -myFirstBox[46].setConnections(0b10000101); -myFirstBox[47].setConnections(0b10011010); -myFirstBox[48].setConnections(0b10010110); -myFirstBox[49].setConnections(0b01011010); -myFirstBox[50].setConnections(0b10011001); -myFirstBox[51].setConnections(0b01001001); -myFirstBox[52].setConnections(0b10100110); -myFirstBox[53].setConnections(0b01001010); -myFirstBox[54].setConnections(0b10010010); -myFirstBox[55].setConnections(0b01001010); -myFirstBox[56].setConnections(0b01101001); -myFirstBox[57].setConnections(0b10100110); -myFirstBox[58].setConnections(0b10010110); -myFirstBox[59].setConnections(0b10010110); -myFirstBox[60].setConnections(0b10101001); -myFirstBox[61].setConnections(0b00100101); -myFirstBox[62].setConnections(0b00101001); -myFirstBox[63].setConnections(0b01101001); -myFirstBox[64].setConnections(0b01101001); -myFirstBox[65].setConnections(0b00100101); -myFirstBox[66].setConnections(0b10010110); -myFirstBox[67].setConnections(0b10011010); -myFirstBox[68].setConnections(0b01100110); -myFirstBox[69].setConnections(0b10010110); -myFirstBox[70].setConnections(0b01010100); -myFirstBox[71].setConnections(0b01011010); -myFirstBox[72].setConnections(0b01100110); -myFirstBox[73].setConnections(0b01100101); -myFirstBox[74].setConnections(0b10011010); -myFirstBox[75].setConnections(0b10010101); -myFirstBox[76].setConnections(0b10011010); -myFirstBox[77].setConnections(0b01100101); -myFirstBox[78].setConnections(0b10011010); -myFirstBox[79].setConnections(0b01010110); -myFirstBox[80].setConnections(0b01101010); -myFirstBox[81].setConnections(0b01010101); -myFirstBox[82].setConnections(0b01100101); -myFirstBox[83].setConnections(0b10100101); -myFirstBox[84].setConnections(0b01010110); -myFirstBox[85].setConnections(0b01101010); -myFirstBox[86].setConnections(0b10011010); -myFirstBox[87].setConnections(0b10010110); -myFirstBox[88].setConnections(0b01101010); -myFirstBox[89].setConnections(0b01011010); -myFirstBox[90].setConnections(0b01010110); -myFirstBox[91].setConnections(0b01100101); -myFirstBox[92].setConnections(0b00100101); -myFirstBox[93].setConnections(0b10100101); -myFirstBox[94].setConnections(0b10010110); -myFirstBox[95].setConnections(0b01100110); -myFirstBox[96].setConnections(0b10000110); -myFirstBox[97].setConnections(0b01001001); -myFirstBox[98].setConnections(0b10010110); -myFirstBox[99].setConnections(0b10100110); -myFirstBox[100].setConnections(0b10100110); -myFirstBox[101].setConnections(0b01100010); -myFirstBox[102].setConnections(0b01101010); -myFirstBox[103].setConnections(0b10011001); -myFirstBox[104].setConnections(0b01010101); -myFirstBox[105].setConnections(0b10011010); -myFirstBox[106].setConnections(0b10101001); -myFirstBox[107].setConnections(0b01100110); -myFirstBox[108].setConnections(0b10101001); -myFirstBox[109].setConnections(0b10101001); -myFirstBox[110].setConnections(0b10010100); -myFirstBox[111].setConnections(0b01100110); -myFirstBox[112].setConnections(0b01010110); -myFirstBox[113].setConnections(0b10010101); -myFirstBox[114].setConnections(0b01011001); -myFirstBox[115].setConnections(0b01101010); -myFirstBox[116].setConnections(0b10100110); -myFirstBox[117].setConnections(0b10100101); -myFirstBox[118].setConnections(0b10101010); -myFirstBox[119].setConnections(0b01011010); -myFirstBox[120].setConnections(0b10011000); -myFirstBox[121].setConnections(0b10010101); -myFirstBox[122].setConnections(0b10100101); -myFirstBox[123].setConnections(0b10000110); -myFirstBox[124].setConnections(0b01100101); -myFirstBox[125].setConnections(0b10100110); -myFirstBox[126].setConnections(0b10101010); -myFirstBox[127].setConnections(0b01101001); -myFirstBox[128].setConnections(0b01010101); -myFirstBox[129].setConnections(0b01100101); -myFirstBox[130].setConnections(0b10001001); -myFirstBox[131].setConnections(0b01101010); -myFirstBox[132].setConnections(0b01101010); -myFirstBox[133].setConnections(0b01100010); -myFirstBox[134].setConnections(0b01100110); -myFirstBox[135].setConnections(0b10100001); -myFirstBox[136].setConnections(0b10011001); -myFirstBox[137].setConnections(0b01101010); -myFirstBox[138].setConnections(0b01011001); -myFirstBox[139].setConnections(0b10001001); -myFirstBox[140].setConnections(0b01010101); -myFirstBox[141].setConnections(0b10100101); -myFirstBox[142].setConnections(0b01100101); -myFirstBox[143].setConnections(0b10100101); -myFirstBox[144].setConnections(0b10011010); -myFirstBox[145].setConnections(0b10010001); -myFirstBox[146].setConnections(0b10100110); -myFirstBox[147].setConnections(0b01101010); -myFirstBox[148].setConnections(0b10010101); -myFirstBox[149].setConnections(0b01100101); -myFirstBox[150].setConnections(0b10100101); -myFirstBox[151].setConnections(0b10100110); -myFirstBox[152].setConnections(0b10010001); -myFirstBox[153].setConnections(0b10101000); -myFirstBox[154].setConnections(0b10011010); -myFirstBox[155].setConnections(0b10100110); -myFirstBox[156].setConnections(0b01100110); -myFirstBox[157].setConnections(0b10100110); -myFirstBox[158].setConnections(0b01011010); -myFirstBox[159].setConnections(0b10100001); -myFirstBox[160].setConnections(0b01010101); -myFirstBox[161].setConnections(0b10011010); -myFirstBox[162].setConnections(0b10101001); -myFirstBox[163].setConnections(0b01010110); -myFirstBox[164].setConnections(0b01100001); -myFirstBox[165].setConnections(0b01011001); -myFirstBox[166].setConnections(0b01101001); -myFirstBox[167].setConnections(0b10011001); -myFirstBox[168].setConnections(0b10010101); -myFirstBox[169].setConnections(0b01100010); -myFirstBox[170].setConnections(0b01010110); -myFirstBox[171].setConnections(0b00010101); -myFirstBox[172].setConnections(0b10100101); -myFirstBox[173].setConnections(0b10101010); -myFirstBox[174].setConnections(0b10011010); -myFirstBox[175].setConnections(0b01100101); -myFirstBox[176].setConnections(0b10100110); -myFirstBox[177].setConnections(0b10101001); -myFirstBox[178].setConnections(0b01011010); -myFirstBox[179].setConnections(0b01101001); -myFirstBox[180].setConnections(0b10010101); -myFirstBox[181].setConnections(0b01101010); -myFirstBox[182].setConnections(0b10010110); -myFirstBox[183].setConnections(0b10010110); -myFirstBox[184].setConnections(0b10011001); -myFirstBox[185].setConnections(0b10100101); -myFirstBox[186].setConnections(0b10010110); -myFirstBox[187].setConnections(0b10010110); -myFirstBox[188].setConnections(0b10011010); -myFirstBox[189].setConnections(0b10010101); -myFirstBox[190].setConnections(0b01010001); -myFirstBox[191].setConnections(0b01010100); -myFirstBox[192].setConnections(0b10101000); -myFirstBox[193].setConnections(0b10100110); -myFirstBox[194].setConnections(0b01010001); -myFirstBox[195].setConnections(0b01010101); -myFirstBox[196].setConnections(0b01100110); -myFirstBox[197].setConnections(0b10100101); -myFirstBox[198].setConnections(0b00100101); -myFirstBox[199].setConnections(0b00100101); -myFirstBox[200].setConnections(0b10101001); -myFirstBox[201].setConnections(0b10101001); -myFirstBox[202].setConnections(0b01011001); -myFirstBox[203].setConnections(0b00001010); -myFirstBox[204].setConnections(0b01010101); -myFirstBox[205].setConnections(0b10011010); -myFirstBox[206].setConnections(0b10100110); -myFirstBox[207].setConnections(0b10100101); -myFirstBox[208].setConnections(0b10011001); -myFirstBox[209].setConnections(0b10100110); -myFirstBox[210].setConnections(0b10101010); -myFirstBox[211].setConnections(0b01010110); -myFirstBox[212].setConnections(0b01010101); -myFirstBox[213].setConnections(0b01100010); -myFirstBox[214].setConnections(0b10010110); -myFirstBox[215].setConnections(0b10011010); -myFirstBox[216].setConnections(0b01100100); -myFirstBox[217].setConnections(0b01010101); -myFirstBox[218].setConnections(0b10011010); -myFirstBox[219].setConnections(0b01100101); -myFirstBox[220].setConnections(0b10101001); -myFirstBox[221].setConnections(0b10010101); -myFirstBox[222].setConnections(0b10100101); -myFirstBox[223].setConnections(0b10101001); -myFirstBox[224].setConnections(0b10100110); -myFirstBox[225].setConnections(0b10011001); -myFirstBox[226].setConnections(0b01011010); -myFirstBox[227].setConnections(0b01000101); -myFirstBox[228].setConnections(0b01100110); -myFirstBox[229].setConnections(0b10101010); -myFirstBox[230].setConnections(0b01010100); -myFirstBox[231].setConnections(0b10101010); -myFirstBox[232].setConnections(0b10011010); -myFirstBox[233].setConnections(0b10100110); -myFirstBox[234].setConnections(0b10011000); -myFirstBox[235].setConnections(0b10011001); -myFirstBox[236].setConnections(0b01010101); -myFirstBox[237].setConnections(0b01001010); -myFirstBox[238].setConnections(0b01100001); -myFirstBox[239].setConnections(0b10011010); -myFirstBox[240].setConnections(0b10010101); -myFirstBox[241].setConnections(0b10100110); -myFirstBox[242].setConnections(0b01010101); -myFirstBox[243].setConnections(0b10010101); -myFirstBox[244].setConnections(0b01101010); -myFirstBox[245].setConnections(0b01101010); -myFirstBox[246].setConnections(0b10100100); -myFirstBox[247].setConnections(0b00101010); -myFirstBox[248].setConnections(0b01100110); -myFirstBox[249].setConnections(0b01101000); -myFirstBox[250].setConnections(0b01101001); -myFirstBox[251].setConnections(0b10101001); -myFirstBox[252].setConnections(0b01010110); -myFirstBox[253].setConnections(0b10010110); -myFirstBox[254].setConnections(0b01100101); -myFirstBox[255].setConnections(0b01011001); -myFirstBox[256].setConnections(0b01100110); -myFirstBox[257].setConnections(0b00100101); -myFirstBox[258].setConnections(0b01101001); -myFirstBox[259].setConnections(0b10010110); -myFirstBox[260].setConnections(0b10011001); -myFirstBox[261].setConnections(0b10011001); -myFirstBox[262].setConnections(0b01101001); -myFirstBox[263].setConnections(0b01010010); -myFirstBox[264].setConnections(0b10101010); -myFirstBox[265].setConnections(0b01101001); -myFirstBox[266].setConnections(0b01101001); -myFirstBox[267].setConnections(0b01101001); -myFirstBox[268].setConnections(0b10010110); -myFirstBox[269].setConnections(0b10011001); -myFirstBox[270].setConnections(0b01101010); -myFirstBox[271].setConnections(0b10000110); -myFirstBox[272].setConnections(0b10010101); -myFirstBox[273].setConnections(0b00010101); -myFirstBox[274].setConnections(0b10101010); -myFirstBox[275].setConnections(0b01010110); -myFirstBox[276].setConnections(0b01100100); -myFirstBox[277].setConnections(0b01010101); -myFirstBox[278].setConnections(0b10010101); -myFirstBox[279].setConnections(0b01010101); -myFirstBox[280].setConnections(0b01011010); -myFirstBox[281].setConnections(0b10011010); -myFirstBox[282].setConnections(0b00010101); -myFirstBox[283].setConnections(0b10010110); -myFirstBox[284].setConnections(0b10100101); -myFirstBox[285].setConnections(0b10010101); -myFirstBox[286].setConnections(0b01101001); -myFirstBox[287].setConnections(0b10100101); -myFirstBox[288].setConnections(0b01101001); -myFirstBox[289].setConnections(0b10011001); -myFirstBox[290].setConnections(0b01011001); -myFirstBox[291].setConnections(0b10010110); -myFirstBox[292].setConnections(0b01010101); -myFirstBox[293].setConnections(0b10100110); -myFirstBox[294].setConnections(0b10101001); -myFirstBox[295].setConnections(0b10101001); -myFirstBox[296].setConnections(0b01011010); -myFirstBox[297].setConnections(0b10100101); -myFirstBox[298].setConnections(0b01011010); -myFirstBox[299].setConnections(0b01100110); -myFirstBox[300].setConnections(0b10010101); -myFirstBox[301].setConnections(0b10101001); -myFirstBox[302].setConnections(0b10011001); -myFirstBox[303].setConnections(0b01010101); -myFirstBox[304].setConnections(0b01010101); -myFirstBox[305].setConnections(0b10101001); -myFirstBox[306].setConnections(0b01100101); -myFirstBox[307].setConnections(0b01101000); -myFirstBox[308].setConnections(0b01010101); -myFirstBox[309].setConnections(0b10010110); -myFirstBox[310].setConnections(0b10010110); -myFirstBox[311].setConnections(0b01011010); -myFirstBox[312].setConnections(0b10010110); -myFirstBox[313].setConnections(0b01011001); -myFirstBox[314].setConnections(0b01010110); -myFirstBox[315].setConnections(0b01101001); -myFirstBox[316].setConnections(0b10100101); -myFirstBox[317].setConnections(0b10101010); -myFirstBox[318].setConnections(0b10011001); -myFirstBox[319].setConnections(0b01010110); -myFirstBox[320].setConnections(0b10100000); -myFirstBox[321].setConnections(0b10100101); -myFirstBox[322].setConnections(0b00010101); -myFirstBox[323].setConnections(0b01010110); -myFirstBox[324].setConnections(0b01101010); -myFirstBox[325].setConnections(0b10010110); -myFirstBox[326].setConnections(0b00001001); -myFirstBox[327].setConnections(0b10011010); -myFirstBox[328].setConnections(0b10101010); -myFirstBox[329].setConnections(0b01100101); -myFirstBox[330].setConnections(0b01011010); -myFirstBox[331].setConnections(0b01101010); -myFirstBox[332].setConnections(0b10100101); -myFirstBox[333].setConnections(0b10100101); -myFirstBox[334].setConnections(0b01011000); -myFirstBox[335].setConnections(0b01010110); -myFirstBox[336].setConnections(0b00100110); -myFirstBox[337].setConnections(0b01101010); -myFirstBox[338].setConnections(0b01101010); -myFirstBox[339].setConnections(0b10010110); -myFirstBox[340].setConnections(0b10101010); -myFirstBox[341].setConnections(0b01100110); -myFirstBox[342].setConnections(0b10011000); -myFirstBox[343].setConnections(0b10101010); -myFirstBox[344].setConnections(0b01011001); -myFirstBox[345].setConnections(0b01101001); -myFirstBox[346].setConnections(0b10010101); -myFirstBox[347].setConnections(0b10101010); -myFirstBox[348].setConnections(0b10011001); -myFirstBox[349].setConnections(0b01101001); -myFirstBox[350].setConnections(0b01010110); -myFirstBox[351].setConnections(0b10000110); -myFirstBox[352].setConnections(0b10010110); -myFirstBox[353].setConnections(0b10011010); -myFirstBox[354].setConnections(0b01010110); -myFirstBox[355].setConnections(0b10010010); -myFirstBox[356].setConnections(0b10100110); -myFirstBox[357].setConnections(0b10101001); -myFirstBox[358].setConnections(0b01011001); -myFirstBox[359].setConnections(0b01010000); -myFirstBox[360].setConnections(0b10011001); -myFirstBox[361].setConnections(0b01101001); -myFirstBox[362].setConnections(0b01100001); -myFirstBox[363].setConnections(0b10100110); -myFirstBox[364].setConnections(0b10100101); -myFirstBox[365].setConnections(0b01100101); -myFirstBox[366].setConnections(0b01001010); -myFirstBox[367].setConnections(0b10010110); -myFirstBox[368].setConnections(0b10010101); -myFirstBox[369].setConnections(0b10010100); -myFirstBox[370].setConnections(0b01010101); -myFirstBox[371].setConnections(0b01011000); -myFirstBox[372].setConnections(0b01100010); -myFirstBox[373].setConnections(0b10011001); -myFirstBox[374].setConnections(0b01100110); -myFirstBox[375].setConnections(0b10100101); -myFirstBox[376].setConnections(0b01000110); -myFirstBox[377].setConnections(0b01010101); -myFirstBox[378].setConnections(0b01100110); -myFirstBox[379].setConnections(0b10100110); -myFirstBox[380].setConnections(0b00100110); -myFirstBox[381].setConnections(0b01101001); -myFirstBox[382].setConnections(0b01100101); -myFirstBox[383].setConnections(0b10010101); -myFirstBox[384].setConnections(0b01101001); -myFirstBox[385].setConnections(0b10010110); -myFirstBox[386].setConnections(0b10010101); -myFirstBox[387].setConnections(0b10101001); -myFirstBox[388].setConnections(0b10011001); -myFirstBox[389].setConnections(0b01010110); -myFirstBox[390].setConnections(0b10100010); -myFirstBox[391].setConnections(0b10101001); -myFirstBox[392].setConnections(0b01101010); -myFirstBox[393].setConnections(0b10101010); -myFirstBox[394].setConnections(0b01100110); -myFirstBox[395].setConnections(0b01010101); -myFirstBox[396].setConnections(0b01101001); -myFirstBox[397].setConnections(0b10010101); -myFirstBox[398].setConnections(0b10100110); -myFirstBox[399].setConnections(0b01101010); -return; - + + void create4040hardBox(vector& myFirstBox) +{ +myFirstBox[0].setConnections(0b01101001); +myFirstBox[1].setConnections(0b10011001); +myFirstBox[2].setConnections(0b01100110); +myFirstBox[3].setConnections(0b01101001); +myFirstBox[4].setConnections(0b10100101); +myFirstBox[5].setConnections(0b10010010); +myFirstBox[6].setConnections(0b01101001); +myFirstBox[7].setConnections(0b00101010); +myFirstBox[8].setConnections(0b01000110); +myFirstBox[9].setConnections(0b01011010); +myFirstBox[10].setConnections(0b01011010); +myFirstBox[11].setConnections(0b10010101); +myFirstBox[12].setConnections(0b01010101); +myFirstBox[13].setConnections(0b10101001); +myFirstBox[14].setConnections(0b10010101); +myFirstBox[15].setConnections(0b10101010); +myFirstBox[16].setConnections(0b01101010); +myFirstBox[17].setConnections(0b01101010); +myFirstBox[18].setConnections(0b00100101); +myFirstBox[19].setConnections(0b01100101); +myFirstBox[20].setConnections(0b10010001); +myFirstBox[21].setConnections(0b10010101); +myFirstBox[22].setConnections(0b10101001); +myFirstBox[23].setConnections(0b01010110); +myFirstBox[24].setConnections(0b10101010); +myFirstBox[25].setConnections(0b01101000); +myFirstBox[26].setConnections(0b01101010); +myFirstBox[27].setConnections(0b10010101); +myFirstBox[28].setConnections(0b10011010); +myFirstBox[29].setConnections(0b10011001); +myFirstBox[30].setConnections(0b01101010); +myFirstBox[31].setConnections(0b01100001); +myFirstBox[32].setConnections(0b01101010); +myFirstBox[33].setConnections(0b01100101); +myFirstBox[34].setConnections(0b01010101); +myFirstBox[35].setConnections(0b01010110); +myFirstBox[36].setConnections(0b01101010); +myFirstBox[37].setConnections(0b01010110); +myFirstBox[38].setConnections(0b01100110); +myFirstBox[39].setConnections(0b01011010); +myFirstBox[40].setConnections(0b01100101); +myFirstBox[41].setConnections(0b01101001); +myFirstBox[42].setConnections(0b01010110); +myFirstBox[43].setConnections(0b01000110); +myFirstBox[44].setConnections(0b01011001); +myFirstBox[45].setConnections(0b01101001); +myFirstBox[46].setConnections(0b10000101); +myFirstBox[47].setConnections(0b10011010); +myFirstBox[48].setConnections(0b10010110); +myFirstBox[49].setConnections(0b01011010); +myFirstBox[50].setConnections(0b10011001); +myFirstBox[51].setConnections(0b01001001); +myFirstBox[52].setConnections(0b10100110); +myFirstBox[53].setConnections(0b01001010); +myFirstBox[54].setConnections(0b10010010); +myFirstBox[55].setConnections(0b01001010); +myFirstBox[56].setConnections(0b01101001); +myFirstBox[57].setConnections(0b10100110); +myFirstBox[58].setConnections(0b10010110); +myFirstBox[59].setConnections(0b10010110); +myFirstBox[60].setConnections(0b10101001); +myFirstBox[61].setConnections(0b00100101); +myFirstBox[62].setConnections(0b00101001); +myFirstBox[63].setConnections(0b01101001); +myFirstBox[64].setConnections(0b01101001); +myFirstBox[65].setConnections(0b00100101); +myFirstBox[66].setConnections(0b10010110); +myFirstBox[67].setConnections(0b10011010); +myFirstBox[68].setConnections(0b01100110); +myFirstBox[69].setConnections(0b10010110); +myFirstBox[70].setConnections(0b01010100); +myFirstBox[71].setConnections(0b01011010); +myFirstBox[72].setConnections(0b01100110); +myFirstBox[73].setConnections(0b01100101); +myFirstBox[74].setConnections(0b10011010); +myFirstBox[75].setConnections(0b10010101); +myFirstBox[76].setConnections(0b10011010); +myFirstBox[77].setConnections(0b01100101); +myFirstBox[78].setConnections(0b10011010); +myFirstBox[79].setConnections(0b01010110); +myFirstBox[80].setConnections(0b01101010); +myFirstBox[81].setConnections(0b01010101); +myFirstBox[82].setConnections(0b01100101); +myFirstBox[83].setConnections(0b10100101); +myFirstBox[84].setConnections(0b01010110); +myFirstBox[85].setConnections(0b01101010); +myFirstBox[86].setConnections(0b10011010); +myFirstBox[87].setConnections(0b10010110); +myFirstBox[88].setConnections(0b01101010); +myFirstBox[89].setConnections(0b01011010); +myFirstBox[90].setConnections(0b01010110); +myFirstBox[91].setConnections(0b01100101); +myFirstBox[92].setConnections(0b00100101); +myFirstBox[93].setConnections(0b10100101); +myFirstBox[94].setConnections(0b10010110); +myFirstBox[95].setConnections(0b01100110); +myFirstBox[96].setConnections(0b10000110); +myFirstBox[97].setConnections(0b01001001); +myFirstBox[98].setConnections(0b10010110); +myFirstBox[99].setConnections(0b10100110); +myFirstBox[100].setConnections(0b10100110); +myFirstBox[101].setConnections(0b01100010); +myFirstBox[102].setConnections(0b01101010); +myFirstBox[103].setConnections(0b10011001); +myFirstBox[104].setConnections(0b01010101); +myFirstBox[105].setConnections(0b10011010); +myFirstBox[106].setConnections(0b10101001); +myFirstBox[107].setConnections(0b01100110); +myFirstBox[108].setConnections(0b10101001); +myFirstBox[109].setConnections(0b10101001); +myFirstBox[110].setConnections(0b10010100); +myFirstBox[111].setConnections(0b01100110); +myFirstBox[112].setConnections(0b01010110); +myFirstBox[113].setConnections(0b10010101); +myFirstBox[114].setConnections(0b01011001); +myFirstBox[115].setConnections(0b01101010); +myFirstBox[116].setConnections(0b10100110); +myFirstBox[117].setConnections(0b10100101); +myFirstBox[118].setConnections(0b10101010); +myFirstBox[119].setConnections(0b01011010); +myFirstBox[120].setConnections(0b10011000); +myFirstBox[121].setConnections(0b10010101); +myFirstBox[122].setConnections(0b10100101); +myFirstBox[123].setConnections(0b10000110); +myFirstBox[124].setConnections(0b01100101); +myFirstBox[125].setConnections(0b10100110); +myFirstBox[126].setConnections(0b10101010); +myFirstBox[127].setConnections(0b01101001); +myFirstBox[128].setConnections(0b01010101); +myFirstBox[129].setConnections(0b01100101); +myFirstBox[130].setConnections(0b10001001); +myFirstBox[131].setConnections(0b01101010); +myFirstBox[132].setConnections(0b01101010); +myFirstBox[133].setConnections(0b01100010); +myFirstBox[134].setConnections(0b01100110); +myFirstBox[135].setConnections(0b10100001); +myFirstBox[136].setConnections(0b10011001); +myFirstBox[137].setConnections(0b01101010); +myFirstBox[138].setConnections(0b01011001); +myFirstBox[139].setConnections(0b10001001); +myFirstBox[140].setConnections(0b01010101); +myFirstBox[141].setConnections(0b10100101); +myFirstBox[142].setConnections(0b01100101); +myFirstBox[143].setConnections(0b10100101); +myFirstBox[144].setConnections(0b10011010); +myFirstBox[145].setConnections(0b10010001); +myFirstBox[146].setConnections(0b10100110); +myFirstBox[147].setConnections(0b01101010); +myFirstBox[148].setConnections(0b10010101); +myFirstBox[149].setConnections(0b01100101); +myFirstBox[150].setConnections(0b10100101); +myFirstBox[151].setConnections(0b10100110); +myFirstBox[152].setConnections(0b10010001); +myFirstBox[153].setConnections(0b10101000); +myFirstBox[154].setConnections(0b10011010); +myFirstBox[155].setConnections(0b10100110); +myFirstBox[156].setConnections(0b01100110); +myFirstBox[157].setConnections(0b10100110); +myFirstBox[158].setConnections(0b01011010); +myFirstBox[159].setConnections(0b10100001); +myFirstBox[160].setConnections(0b01010101); +myFirstBox[161].setConnections(0b10011010); +myFirstBox[162].setConnections(0b10101001); +myFirstBox[163].setConnections(0b01010110); +myFirstBox[164].setConnections(0b01100001); +myFirstBox[165].setConnections(0b01011001); +myFirstBox[166].setConnections(0b01101001); +myFirstBox[167].setConnections(0b10011001); +myFirstBox[168].setConnections(0b10010101); +myFirstBox[169].setConnections(0b01100010); +myFirstBox[170].setConnections(0b01010110); +myFirstBox[171].setConnections(0b00010101); +myFirstBox[172].setConnections(0b10100101); +myFirstBox[173].setConnections(0b10101010); +myFirstBox[174].setConnections(0b10011010); +myFirstBox[175].setConnections(0b01100101); +myFirstBox[176].setConnections(0b10100110); +myFirstBox[177].setConnections(0b10101001); +myFirstBox[178].setConnections(0b01011010); +myFirstBox[179].setConnections(0b01101001); +myFirstBox[180].setConnections(0b10010101); +myFirstBox[181].setConnections(0b01101010); +myFirstBox[182].setConnections(0b10010110); +myFirstBox[183].setConnections(0b10010110); +myFirstBox[184].setConnections(0b10011001); +myFirstBox[185].setConnections(0b10100101); +myFirstBox[186].setConnections(0b10010110); +myFirstBox[187].setConnections(0b10010110); +myFirstBox[188].setConnections(0b10011010); +myFirstBox[189].setConnections(0b10010101); +myFirstBox[190].setConnections(0b01010001); +myFirstBox[191].setConnections(0b01010100); +myFirstBox[192].setConnections(0b10101000); +myFirstBox[193].setConnections(0b10100110); +myFirstBox[194].setConnections(0b01010001); +myFirstBox[195].setConnections(0b01010101); +myFirstBox[196].setConnections(0b01100110); +myFirstBox[197].setConnections(0b10100101); +myFirstBox[198].setConnections(0b00100101); +myFirstBox[199].setConnections(0b00100101); +myFirstBox[200].setConnections(0b10101001); +myFirstBox[201].setConnections(0b10101001); +myFirstBox[202].setConnections(0b01011001); +myFirstBox[203].setConnections(0b00001010); +myFirstBox[204].setConnections(0b01010101); +myFirstBox[205].setConnections(0b10011010); +myFirstBox[206].setConnections(0b10100110); +myFirstBox[207].setConnections(0b10100101); +myFirstBox[208].setConnections(0b10011001); +myFirstBox[209].setConnections(0b10100110); +myFirstBox[210].setConnections(0b10101010); +myFirstBox[211].setConnections(0b01010110); +myFirstBox[212].setConnections(0b01010101); +myFirstBox[213].setConnections(0b01100010); +myFirstBox[214].setConnections(0b10010110); +myFirstBox[215].setConnections(0b10011010); +myFirstBox[216].setConnections(0b01100100); +myFirstBox[217].setConnections(0b01010101); +myFirstBox[218].setConnections(0b10011010); +myFirstBox[219].setConnections(0b01100101); +myFirstBox[220].setConnections(0b10101001); +myFirstBox[221].setConnections(0b10010101); +myFirstBox[222].setConnections(0b10100101); +myFirstBox[223].setConnections(0b10101001); +myFirstBox[224].setConnections(0b10100110); +myFirstBox[225].setConnections(0b10011001); +myFirstBox[226].setConnections(0b01011010); +myFirstBox[227].setConnections(0b01000101); +myFirstBox[228].setConnections(0b01100110); +myFirstBox[229].setConnections(0b10101010); +myFirstBox[230].setConnections(0b01010100); +myFirstBox[231].setConnections(0b10101010); +myFirstBox[232].setConnections(0b10011010); +myFirstBox[233].setConnections(0b10100110); +myFirstBox[234].setConnections(0b10011000); +myFirstBox[235].setConnections(0b10011001); +myFirstBox[236].setConnections(0b01010101); +myFirstBox[237].setConnections(0b01001010); +myFirstBox[238].setConnections(0b01100001); +myFirstBox[239].setConnections(0b10011010); +myFirstBox[240].setConnections(0b10010101); +myFirstBox[241].setConnections(0b10100110); +myFirstBox[242].setConnections(0b01010101); +myFirstBox[243].setConnections(0b10010101); +myFirstBox[244].setConnections(0b01101010); +myFirstBox[245].setConnections(0b01101010); +myFirstBox[246].setConnections(0b10100100); +myFirstBox[247].setConnections(0b00101010); +myFirstBox[248].setConnections(0b01100110); +myFirstBox[249].setConnections(0b01101000); +myFirstBox[250].setConnections(0b01101001); +myFirstBox[251].setConnections(0b10101001); +myFirstBox[252].setConnections(0b01010110); +myFirstBox[253].setConnections(0b10010110); +myFirstBox[254].setConnections(0b01100101); +myFirstBox[255].setConnections(0b01011001); +myFirstBox[256].setConnections(0b01100110); +myFirstBox[257].setConnections(0b00100101); +myFirstBox[258].setConnections(0b01101001); +myFirstBox[259].setConnections(0b10010110); +myFirstBox[260].setConnections(0b10011001); +myFirstBox[261].setConnections(0b10011001); +myFirstBox[262].setConnections(0b01101001); +myFirstBox[263].setConnections(0b01010010); +myFirstBox[264].setConnections(0b10101010); +myFirstBox[265].setConnections(0b01101001); +myFirstBox[266].setConnections(0b01101001); +myFirstBox[267].setConnections(0b01101001); +myFirstBox[268].setConnections(0b10010110); +myFirstBox[269].setConnections(0b10011001); +myFirstBox[270].setConnections(0b01101010); +myFirstBox[271].setConnections(0b10000110); +myFirstBox[272].setConnections(0b10010101); +myFirstBox[273].setConnections(0b00010101); +myFirstBox[274].setConnections(0b10101010); +myFirstBox[275].setConnections(0b01010110); +myFirstBox[276].setConnections(0b01100100); +myFirstBox[277].setConnections(0b01010101); +myFirstBox[278].setConnections(0b10010101); +myFirstBox[279].setConnections(0b01010101); +myFirstBox[280].setConnections(0b01011010); +myFirstBox[281].setConnections(0b10011010); +myFirstBox[282].setConnections(0b00010101); +myFirstBox[283].setConnections(0b10010110); +myFirstBox[284].setConnections(0b10100101); +myFirstBox[285].setConnections(0b10010101); +myFirstBox[286].setConnections(0b01101001); +myFirstBox[287].setConnections(0b10100101); +myFirstBox[288].setConnections(0b01101001); +myFirstBox[289].setConnections(0b10011001); +myFirstBox[290].setConnections(0b01011001); +myFirstBox[291].setConnections(0b10010110); +myFirstBox[292].setConnections(0b01010101); +myFirstBox[293].setConnections(0b10100110); +myFirstBox[294].setConnections(0b10101001); +myFirstBox[295].setConnections(0b10101001); +myFirstBox[296].setConnections(0b01011010); +myFirstBox[297].setConnections(0b10100101); +myFirstBox[298].setConnections(0b01011010); +myFirstBox[299].setConnections(0b01100110); +myFirstBox[300].setConnections(0b10010101); +myFirstBox[301].setConnections(0b10101001); +myFirstBox[302].setConnections(0b10011001); +myFirstBox[303].setConnections(0b01010101); +myFirstBox[304].setConnections(0b01010101); +myFirstBox[305].setConnections(0b10101001); +myFirstBox[306].setConnections(0b01100101); +myFirstBox[307].setConnections(0b01101000); +myFirstBox[308].setConnections(0b01010101); +myFirstBox[309].setConnections(0b10010110); +myFirstBox[310].setConnections(0b10010110); +myFirstBox[311].setConnections(0b01011010); +myFirstBox[312].setConnections(0b10010110); +myFirstBox[313].setConnections(0b01011001); +myFirstBox[314].setConnections(0b01010110); +myFirstBox[315].setConnections(0b01101001); +myFirstBox[316].setConnections(0b10100101); +myFirstBox[317].setConnections(0b10101010); +myFirstBox[318].setConnections(0b10011001); +myFirstBox[319].setConnections(0b01010110); +myFirstBox[320].setConnections(0b10100000); +myFirstBox[321].setConnections(0b10100101); +myFirstBox[322].setConnections(0b00010101); +myFirstBox[323].setConnections(0b01010110); +myFirstBox[324].setConnections(0b01101010); +myFirstBox[325].setConnections(0b10010110); +myFirstBox[326].setConnections(0b00001001); +myFirstBox[327].setConnections(0b10011010); +myFirstBox[328].setConnections(0b10101010); +myFirstBox[329].setConnections(0b01100101); +myFirstBox[330].setConnections(0b01011010); +myFirstBox[331].setConnections(0b01101010); +myFirstBox[332].setConnections(0b10100101); +myFirstBox[333].setConnections(0b10100101); +myFirstBox[334].setConnections(0b01011000); +myFirstBox[335].setConnections(0b01010110); +myFirstBox[336].setConnections(0b00100110); +myFirstBox[337].setConnections(0b01101010); +myFirstBox[338].setConnections(0b01101010); +myFirstBox[339].setConnections(0b10010110); +myFirstBox[340].setConnections(0b10101010); +myFirstBox[341].setConnections(0b01100110); +myFirstBox[342].setConnections(0b10011000); +myFirstBox[343].setConnections(0b10101010); +myFirstBox[344].setConnections(0b01011001); +myFirstBox[345].setConnections(0b01101001); +myFirstBox[346].setConnections(0b10010101); +myFirstBox[347].setConnections(0b10101010); +myFirstBox[348].setConnections(0b10011001); +myFirstBox[349].setConnections(0b01101001); +myFirstBox[350].setConnections(0b01010110); +myFirstBox[351].setConnections(0b10000110); +myFirstBox[352].setConnections(0b10010110); +myFirstBox[353].setConnections(0b10011010); +myFirstBox[354].setConnections(0b01010110); +myFirstBox[355].setConnections(0b10010010); +myFirstBox[356].setConnections(0b10100110); +myFirstBox[357].setConnections(0b10101001); +myFirstBox[358].setConnections(0b01011001); +myFirstBox[359].setConnections(0b01010000); +myFirstBox[360].setConnections(0b10011001); +myFirstBox[361].setConnections(0b01101001); +myFirstBox[362].setConnections(0b01100001); +myFirstBox[363].setConnections(0b10100110); +myFirstBox[364].setConnections(0b10100101); +myFirstBox[365].setConnections(0b01100101); +myFirstBox[366].setConnections(0b01001010); +myFirstBox[367].setConnections(0b10010110); +myFirstBox[368].setConnections(0b10010101); +myFirstBox[369].setConnections(0b10010100); +myFirstBox[370].setConnections(0b01010101); +myFirstBox[371].setConnections(0b01011000); +myFirstBox[372].setConnections(0b01100010); +myFirstBox[373].setConnections(0b10011001); +myFirstBox[374].setConnections(0b01100110); +myFirstBox[375].setConnections(0b10100101); +myFirstBox[376].setConnections(0b01000110); +myFirstBox[377].setConnections(0b01010101); +myFirstBox[378].setConnections(0b01100110); +myFirstBox[379].setConnections(0b10100110); +myFirstBox[380].setConnections(0b00100110); +myFirstBox[381].setConnections(0b01101001); +myFirstBox[382].setConnections(0b01100101); +myFirstBox[383].setConnections(0b10010101); +myFirstBox[384].setConnections(0b01101001); +myFirstBox[385].setConnections(0b10010110); +myFirstBox[386].setConnections(0b10010101); +myFirstBox[387].setConnections(0b10101001); +myFirstBox[388].setConnections(0b10011001); +myFirstBox[389].setConnections(0b01010110); +myFirstBox[390].setConnections(0b10100010); +myFirstBox[391].setConnections(0b10101001); +myFirstBox[392].setConnections(0b01101010); +myFirstBox[393].setConnections(0b10101010); +myFirstBox[394].setConnections(0b01100110); +myFirstBox[395].setConnections(0b01010101); +myFirstBox[396].setConnections(0b01101001); +myFirstBox[397].setConnections(0b10010101); +myFirstBox[398].setConnections(0b10100110); +myFirstBox[399].setConnections(0b01101010); +return; + } \ No newline at end of file diff --git a/TeamCMU/Revision_03/a.out b/Legacy/Revision_03/a.out similarity index 100% rename from TeamCMU/Revision_03/a.out rename to Legacy/Revision_03/a.out diff --git a/TeamCMU/Revision_03/main.cpp b/Legacy/Revision_03/main.cpp similarity index 95% rename from TeamCMU/Revision_03/main.cpp rename to Legacy/Revision_03/main.cpp index 3701526..a0b5f76 100644 --- a/TeamCMU/Revision_03/main.cpp +++ b/Legacy/Revision_03/main.cpp @@ -1,115 +1,115 @@ -//Raphael Maenle - 11.11.2017 -#include -#include -#include -#include -#include -#include - -#define debug - -#include "puzzle.h" -#include "test_puzzle.h" - -using namespace std; - -vector log; - -int main() -{ - srand(time(0)); - - vector part_array(NR_PARTS); - vector corners_array(NR_CORNERS); - vector edges_array(NR_EDGES); - vector inners_array(NR_INNERS); - - //randomBox myPuzzle(cols,rows); - //myPuzzle.createRandomPuzzle(); - - unsigned int rows=20, cols=20; - vector myFirstBox = createBox(cols, rows); - create4040hardBox(myFirstBox); - - printBox(myFirstBox); - cout << endl; - - - - - - - - - - - while(next()); - - - - - return 0; -} - -next() -{ - - //calculates next move according to log - - //case puzzle solved - //return 0; - - //case last log empty - //backtrack - - //case last log exactly one solution - //put all remaining puzzle pieces into new log entry - //try next piece/place with solve abstraction level 0 - - //case last log multiple entries - //advance abstraction layer of last log by one and solve() - //or pick first if highest level reached - - //return 1; -} - -solve() -{ - //case - //abstraction layer = 0 - //go to abstraction layer 0 solver - - //case - //abstraction layer = 1 - //go to abstraction layer 1 solver - //default - //random one of the parts -} - -abstractionlayer0solver() -{ - //throw all remaining puzzle pieces into log - //remove all impossible -} - -abstractionlayer1solver() -{ - //remove all impossible according to abstraction layer one -} - -setsolution() -{ - //put - //set pointer to log into matrix -} - -backtrack() -{ - //following possibilities: - //last log entry empty - //delete last log + backtrack - //last log entry only one solution - //delete last log + backtrack - //last log entry multiple solutions (and current one was randomed) - //delete randomed piece from puzzleCollector and go to next (which might random again depending on function) +//Raphael Maenle - 11.11.2017 +#include +#include +#include +#include +#include +#include + +#define debug + +#include "puzzle.h" +#include "test_puzzle.h" + +using namespace std; + +vector log; + +int main() +{ + srand(time(0)); + + vector part_array(NR_PARTS); + vector corners_array(NR_CORNERS); + vector edges_array(NR_EDGES); + vector inners_array(NR_INNERS); + + //randomBox myPuzzle(cols,rows); + //myPuzzle.createRandomPuzzle(); + + unsigned int rows=20, cols=20; + vector myFirstBox = createBox(cols, rows); + create4040hardBox(myFirstBox); + + printBox(myFirstBox); + cout << endl; + + + + + + + + + + + while(next()); + + + + + return 0; +} + +next() +{ + + //calculates next move according to log + + //case puzzle solved + //return 0; + + //case last log empty + //backtrack + + //case last log exactly one solution + //put all remaining puzzle pieces into new log entry + //try next piece/place with solve abstraction level 0 + + //case last log multiple entries + //advance abstraction layer of last log by one and solve() + //or pick first if highest level reached + + //return 1; +} + +solve() +{ + //case + //abstraction layer = 0 + //go to abstraction layer 0 solver + + //case + //abstraction layer = 1 + //go to abstraction layer 1 solver + //default + //random one of the parts +} + +abstractionlayer0solver() +{ + //throw all remaining puzzle pieces into log + //remove all impossible +} + +abstractionlayer1solver() +{ + //remove all impossible according to abstraction layer one +} + +setsolution() +{ + //put + //set pointer to log into matrix +} + +backtrack() +{ + //following possibilities: + //last log entry empty + //delete last log + backtrack + //last log entry only one solution + //delete last log + backtrack + //last log entry multiple solutions (and current one was randomed) + //delete randomed piece from puzzleCollector and go to next (which might random again depending on function) } \ No newline at end of file diff --git a/TeamCMU/Revision_03/puzzle.h b/Legacy/Revision_03/puzzle.h similarity index 97% rename from TeamCMU/Revision_03/puzzle.h rename to Legacy/Revision_03/puzzle.h index 2d61058..54b75fc 100644 --- a/TeamCMU/Revision_03/puzzle.h +++ b/Legacy/Revision_03/puzzle.h @@ -1,467 +1,467 @@ -#include - -#define NR_PARTS 1008 -#define NR_CORNERS 4 -#define NR_EDGES 120 -#define NR_INNERS 884 - -using namespace std; - -//part from group header file -class Part -{ -public: - Part(): connections(0){} - ~Part() {} - uint8_t getConnections() const - { - return connections; - } - void setConnections(uint8_t newconnections) - { - connections = newconnections; - } - -private: - uint8_t connections; -}; - -//puzzlepiece extens part with essential identifiers and functions -class PuzzlePiece: public Part -{ -public: - - PuzzlePiece(unsigned int flag = 0) - { - shifts=0; - boxidentifier=-1; - switch(flag) - { - case 0: - setConnections(0b00000000); - break; - case 1: - setConnections(0b11111111); - break; - case 3: - randomCenterPiece(); - break; - } - } - - void shift(unsigned int moves); - void randomCenterPiece(); - void printPiece() { cout << bitset (getConnections()); } - - void setBoxIdentifier(int new_boxid) { boxidentifier = new_boxid; } - int getBoxIdentifier() { return boxidentifier; } - void assignIdentifier() { identifier = idcount;idcount++; } - unsigned int getIdentifier() { return identifier;} - -private: - unsigned int shifts; - unsigned int boxidentifier; - unsigned int identifier; - static unsigned int idcount; -}; - -unsigned int PuzzlePiece::idcount(0); - -class Puzzle -{ - friend class randomBox; -public: - //constructor creates matrix with 00 outside and 11 inside - Puzzle(uint m = 7, uint n = 4): col(m), row(n) - { - Matrix = new PuzzlePiece* [n+2]; - for(int i = 0;i& myBox, unsigned int separator); - unsigned int putBackIntoBox(unsigned int m, unsigned int n, vector& myBox); - - -private: - uint row; - uint col; - - PuzzlePiece** Matrix; - -}; - -//use this for random puzzle creation -class randomBox: public Puzzle -{ -public: - - randomBox(unsigned int m, unsigned int n) : Puzzle(m,n) {} //passed m n to puzzle constructor - - void createRandomPuzzle(); - vector shuffle(); - void printBox(); - -private: - vector Box; - -}; - -class coor -{ - int m, n; - coor(int newm,int newn): m(newm), n(newn) - {} -} - -class LogEntry -{ -public: - vector PieceCollector; - vector CoorCollector; - int abstractionLevel; - - uint myCoor; - PuzzlePiece* myPuzzlePiece; - - PuzzleCollector() - { - - myCoor.m=-1; - myCoor.n=-1; - abstractionLevel=0; - } -private: -} - - -//functiondefinitions -void printBox(vector myBox); -vector createBox(uint m, uint n); -void numerateBox(vector& myBox); - -//functions - -//shifts puzzle piece one to the right -void PuzzlePiece::shift(unsigned int moves) -{ - shifts = (shifts+moves)%4; - setConnections(((getConnections() >> (moves*2)) | (getConnections() << sizeof(unsigned char)*8 - (moves*2)))); -} - -//creates random centerpiece -void PuzzlePiece::randomCenterPiece() -{ - setConnections(0b00000000); - - if(rand()%2) - setConnections(getConnections() | 0b01000000); - else - setConnections(getConnections() | 0b10000000); - - if(rand()%2) - setConnections(getConnections() | 0b00010000); - else - setConnections(getConnections() | 0b00100000); - - if(rand()%2) - setConnections(getConnections() | 0b00000100); - else - setConnections(getConnections() | 0b00001000); - - if(rand()%2) - setConnections(getConnections() | 0b00000001); - else - setConnections(getConnections() | 0b00000010); -} - -//tries all pieces in box from separator to end and places fitting into matrix. removes fitting piece -//use separator if you have to retract to a position -//seperator may be bigger than box size, if all puzzle pieces have already been looked at. -// it immediately retracts again then (returns -1) -unsigned int Puzzle::tryAllPieces(unsigned int m, unsigned int n, vector& myBox, unsigned int separator) -{ - for(int i=separator; i& myBox) -{ -#ifdef debug -cout << "putting back" << endl; -cout << "Old Box: "; -printBox(myBox); -cout << endl; -#endif - for(int i = 0; i < myBox.size();i++) - { - if(myBox[i].getBoxIdentifier()>getPiece(m,n).getBoxIdentifier()) - { - myBox.insert(myBox.begin()+i,getPiece(m,n)); - removePiece(m,n); - return i+1; - } - } - //using push back, if the element was the last element in the vector chain - myBox.push_back(getPiece(m,n)); - removePiece(m,n); - return myBox.size(); -} - -//checks if the myPart in its current orientation is legal in position m, n -bool Puzzle::PlaceOfPartGood(unsigned int m,unsigned int n, PuzzlePiece& myPart) -{ - - PuzzlePiece negativePart(0); - - negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n+1).getConnections() & 0b11000000)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m-1,n).getConnections() & 0b00110000)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n-1).getConnections() & 0b00001100)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m+1,n).getConnections() & 0b00000011)); - negativePart.shift(2); - - - - if ( - ( ((((negativePart.getConnections() & 0b11000000) ^ (myPart.getConnections() & 0b11000000)) != 0b00000000) && (((myPart.getConnections() & 0b11000000) != 0b00000000) && (negativePart.getConnections() & 0b11000000) != 0b00000000)) - || ((((negativePart.getConnections() & 0b11000000) == 0b11000000) || ((myPart.getConnections() & 0b11000000) == 0b11000000)) && (( myPart.getConnections() & 0b11000000) != 0b00000000) && (negativePart.getConnections() & 0b11000000) != 0b00000000) - || (((negativePart.getConnections() & 0b11000000) == 0b00000000) && ((myPart.getConnections() & 0b11000000) == 0b00000000)) ) - && - ( ((((negativePart.getConnections() & 0b00110000) ^ (myPart.getConnections() & 0b00110000)) != 0b00000000) && (((myPart.getConnections() & 0b00110000) != 0b00000000) && (negativePart.getConnections() & 0b00110000) != 0b00000000)) - || ((((negativePart.getConnections() & 0b00110000) == 0b00110000) || ((myPart.getConnections() & 0b00110000) == 0b00110000)) && (((myPart.getConnections() & 0b00110000) != 0b00000000) && (negativePart.getConnections() & 0b00110000) != 0b00000000)) - || (((negativePart.getConnections() & 0b00110000) == 0b00000000) && ((myPart.getConnections() & 0b00110000) == 0b00000000)) ) - && - ( ((((negativePart.getConnections() & 0b00001100) ^ (myPart.getConnections() & 0b00001100)) != 0b00000000) && (((myPart.getConnections() & 0b00001100) != 0b00000000) && (negativePart.getConnections() & 0b00001100) != 0b00000000)) - || ((((negativePart.getConnections() & 0b00001100) == 0b00001100) || ((myPart.getConnections() & 0b00001100) == 0b00001100)) && (((myPart.getConnections() & 0b00001100) != 0b00000000) && (negativePart.getConnections() & 0b00001100) != 0b00000000)) - || (((negativePart.getConnections() & 0b00001100) == 0b00000000) && ((myPart.getConnections() & 0b00001100) == 0b00000000)) ) - && - ( ((((negativePart.getConnections() & 0b00000011) ^ (myPart.getConnections() & 0b00000011)) != 0b00000000) && (((myPart.getConnections() & 0b00000011) != 0b00000000) && (negativePart.getConnections() & 0b00000011) != 0b00000000)) - || ((((negativePart.getConnections() & 0b00000011) == 0b00000011) || ((myPart.getConnections() & 0b00000011) == 0b00000011)) && (((myPart.getConnections() & 0b00000011) != 0b00000000) && (negativePart.getConnections() & 0b00000011) != 0b00000000)) - || (((negativePart.getConnections() & 0b00000011) == 0b00000000) && ((myPart.getConnections() & 0b00000011) == 0b00000000)) ) - ) - { -#ifdef debug -cout << "good Part: "; -myPart.printPiece(); -cout << endl; -#endif - return 1; - } - - - - return 0; -} - - -//TODO!! -//simpler algorithm to the first placeofpartgood -//not yet functional!!! -bool Puzzle::PlaceOfPart2Good(unsigned int m,unsigned int n, PuzzlePiece& myPart) -{ - - PuzzlePiece negativePart(0); - - negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n+1).getConnections() & 0b11000000)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m-1,n).getConnections() & 0b00110000)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n-1).getConnections() & 0b00001100)); - negativePart.setConnections(negativePart.getConnections() | (getPiece(m+1,n).getConnections() & 0b00000011)); - negativePart.shift(2); - - //A and D or B and C or not A and not B and not C and not D - - if ( - ( ( (negativePart.getConnections() & 0b10000000) & (myPart.getConnections() & 0b01000000)) - || ( (negativePart.getConnections() & 0b01000000) & (myPart.getConnections() & 0b10000000)) - || ((!(negativePart.getConnections() & 0b10000000) & !(myPart.getConnections() & 0b10000000)) & (!(negativePart.getConnections() & 0b01000000) & !(myPart.getConnections() & 0b01000000))) - ) - && - ( ( (negativePart.getConnections() & 0b00100000) & (myPart.getConnections() & 0b00010000)) - || ( (negativePart.getConnections() & 0b00010000) & (myPart.getConnections() & 0b00100000)) - || ((!(negativePart.getConnections() & 0b00100000) & !(myPart.getConnections() & 0b00100000)) & (!(negativePart.getConnections() & 0b00010000) & !(myPart.getConnections() & 0b00010000))) - ) - && - ( ( (negativePart.getConnections() & 0b00001000) & (myPart.getConnections() & 0b00000100)) - || ( (negativePart.getConnections() & 0b00000100) & (myPart.getConnections() & 0b00001000)) - || ((!(negativePart.getConnections() & 0b00001000) & !(myPart.getConnections() & 0b00001000)) & (!(negativePart.getConnections() & 0b00000100) & !(myPart.getConnections() & 0b00000100))) - ) - && - ( ( (negativePart.getConnections() & 0b00000010) & (myPart.getConnections() & 0b00000001)) - || ( (negativePart.getConnections() & 0b00000001) & (myPart.getConnections() & 0b00000010)) - || ((!(negativePart.getConnections() & 0b00000010) & !(myPart.getConnections() & 0b00000010)) & (!(negativePart.getConnections() & 0b00000001) & !(myPart.getConnections() & 0b00000001))) - ) - ) - - return 1; - - cout << "nogood" << endl; - return 0; -} - -//prints the true puzzle (without 0 edges) -void Puzzle::printPuzzle() -{ - cout << "current Puzzle: " << endl; - for(int i=1;i::iterator i = Box.begin(); i != Box.end(); i++) - { - (*i).printPiece(); - cout << ' '; - } - cout << endl; -} - -//shuffles around a box, randomizing pieces and orientation -vector randomBox::shuffle() -{ - random_shuffle(Box.begin(),Box.end()); - for (vector::iterator i = Box.begin(); i != Box.end(); i++) - (*i).shift(rand()%4); - numerateBox(Box); - return Box; -} - -//creates a random box size m, n, shuffles it, and then retuns it -vector createBox(uint m, uint n) -{ - randomBox myFirstPuzzleBox(m,n); - myFirstPuzzleBox.createRandomPuzzle(); - return myFirstPuzzleBox.shuffle(); -} - -//prints contents of box -void printBox(vector myBox) -{ - cout << "current Box: " << endl; - for (vector::iterator i = myBox.begin(); i != myBox.end(); i++) - { - (*i).printPiece(); - cout << ' '; - } - cout << endl; - return; -} - -//gives every element in box a box identifier. -void numerateBox(vector& myBox) -{ - for(int i = 0; i< myBox.size();i++) - myBox[i].setBoxIdentifier(i); - - return; +#include + +#define NR_PARTS 1008 +#define NR_CORNERS 4 +#define NR_EDGES 120 +#define NR_INNERS 884 + +using namespace std; + +//part from group header file +class Part +{ +public: + Part(): connections(0){} + ~Part() {} + uint8_t getConnections() const + { + return connections; + } + void setConnections(uint8_t newconnections) + { + connections = newconnections; + } + +private: + uint8_t connections; +}; + +//puzzlepiece extens part with essential identifiers and functions +class PuzzlePiece: public Part +{ +public: + + PuzzlePiece(unsigned int flag = 0) + { + shifts=0; + boxidentifier=-1; + switch(flag) + { + case 0: + setConnections(0b00000000); + break; + case 1: + setConnections(0b11111111); + break; + case 3: + randomCenterPiece(); + break; + } + } + + void shift(unsigned int moves); + void randomCenterPiece(); + void printPiece() { cout << bitset (getConnections()); } + + void setBoxIdentifier(int new_boxid) { boxidentifier = new_boxid; } + int getBoxIdentifier() { return boxidentifier; } + void assignIdentifier() { identifier = idcount;idcount++; } + unsigned int getIdentifier() { return identifier;} + +private: + unsigned int shifts; + unsigned int boxidentifier; + unsigned int identifier; + static unsigned int idcount; +}; + +unsigned int PuzzlePiece::idcount(0); + +class Puzzle +{ + friend class randomBox; +public: + //constructor creates matrix with 00 outside and 11 inside + Puzzle(uint m = 7, uint n = 4): col(m), row(n) + { + Matrix = new PuzzlePiece* [n+2]; + for(int i = 0;i& myBox, unsigned int separator); + unsigned int putBackIntoBox(unsigned int m, unsigned int n, vector& myBox); + + +private: + uint row; + uint col; + + PuzzlePiece** Matrix; + +}; + +//use this for random puzzle creation +class randomBox: public Puzzle +{ +public: + + randomBox(unsigned int m, unsigned int n) : Puzzle(m,n) {} //passed m n to puzzle constructor + + void createRandomPuzzle(); + vector shuffle(); + void printBox(); + +private: + vector Box; + +}; + +class coor +{ + int m, n; + coor(int newm,int newn): m(newm), n(newn) + {} +} + +class LogEntry +{ +public: + vector PieceCollector; + vector CoorCollector; + int abstractionLevel; + + uint myCoor; + PuzzlePiece* myPuzzlePiece; + + PuzzleCollector() + { + + myCoor.m=-1; + myCoor.n=-1; + abstractionLevel=0; + } +private: +} + + +//functiondefinitions +void printBox(vector myBox); +vector createBox(uint m, uint n); +void numerateBox(vector& myBox); + +//functions + +//shifts puzzle piece one to the right +void PuzzlePiece::shift(unsigned int moves) +{ + shifts = (shifts+moves)%4; + setConnections(((getConnections() >> (moves*2)) | (getConnections() << sizeof(unsigned char)*8 - (moves*2)))); +} + +//creates random centerpiece +void PuzzlePiece::randomCenterPiece() +{ + setConnections(0b00000000); + + if(rand()%2) + setConnections(getConnections() | 0b01000000); + else + setConnections(getConnections() | 0b10000000); + + if(rand()%2) + setConnections(getConnections() | 0b00010000); + else + setConnections(getConnections() | 0b00100000); + + if(rand()%2) + setConnections(getConnections() | 0b00000100); + else + setConnections(getConnections() | 0b00001000); + + if(rand()%2) + setConnections(getConnections() | 0b00000001); + else + setConnections(getConnections() | 0b00000010); +} + +//tries all pieces in box from separator to end and places fitting into matrix. removes fitting piece +//use separator if you have to retract to a position +//seperator may be bigger than box size, if all puzzle pieces have already been looked at. +// it immediately retracts again then (returns -1) +unsigned int Puzzle::tryAllPieces(unsigned int m, unsigned int n, vector& myBox, unsigned int separator) +{ + for(int i=separator; i& myBox) +{ +#ifdef debug +cout << "putting back" << endl; +cout << "Old Box: "; +printBox(myBox); +cout << endl; +#endif + for(int i = 0; i < myBox.size();i++) + { + if(myBox[i].getBoxIdentifier()>getPiece(m,n).getBoxIdentifier()) + { + myBox.insert(myBox.begin()+i,getPiece(m,n)); + removePiece(m,n); + return i+1; + } + } + //using push back, if the element was the last element in the vector chain + myBox.push_back(getPiece(m,n)); + removePiece(m,n); + return myBox.size(); +} + +//checks if the myPart in its current orientation is legal in position m, n +bool Puzzle::PlaceOfPartGood(unsigned int m,unsigned int n, PuzzlePiece& myPart) +{ + + PuzzlePiece negativePart(0); + + negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n+1).getConnections() & 0b11000000)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m-1,n).getConnections() & 0b00110000)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n-1).getConnections() & 0b00001100)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m+1,n).getConnections() & 0b00000011)); + negativePart.shift(2); + + + + if ( + ( ((((negativePart.getConnections() & 0b11000000) ^ (myPart.getConnections() & 0b11000000)) != 0b00000000) && (((myPart.getConnections() & 0b11000000) != 0b00000000) && (negativePart.getConnections() & 0b11000000) != 0b00000000)) + || ((((negativePart.getConnections() & 0b11000000) == 0b11000000) || ((myPart.getConnections() & 0b11000000) == 0b11000000)) && (( myPart.getConnections() & 0b11000000) != 0b00000000) && (negativePart.getConnections() & 0b11000000) != 0b00000000) + || (((negativePart.getConnections() & 0b11000000) == 0b00000000) && ((myPart.getConnections() & 0b11000000) == 0b00000000)) ) + && + ( ((((negativePart.getConnections() & 0b00110000) ^ (myPart.getConnections() & 0b00110000)) != 0b00000000) && (((myPart.getConnections() & 0b00110000) != 0b00000000) && (negativePart.getConnections() & 0b00110000) != 0b00000000)) + || ((((negativePart.getConnections() & 0b00110000) == 0b00110000) || ((myPart.getConnections() & 0b00110000) == 0b00110000)) && (((myPart.getConnections() & 0b00110000) != 0b00000000) && (negativePart.getConnections() & 0b00110000) != 0b00000000)) + || (((negativePart.getConnections() & 0b00110000) == 0b00000000) && ((myPart.getConnections() & 0b00110000) == 0b00000000)) ) + && + ( ((((negativePart.getConnections() & 0b00001100) ^ (myPart.getConnections() & 0b00001100)) != 0b00000000) && (((myPart.getConnections() & 0b00001100) != 0b00000000) && (negativePart.getConnections() & 0b00001100) != 0b00000000)) + || ((((negativePart.getConnections() & 0b00001100) == 0b00001100) || ((myPart.getConnections() & 0b00001100) == 0b00001100)) && (((myPart.getConnections() & 0b00001100) != 0b00000000) && (negativePart.getConnections() & 0b00001100) != 0b00000000)) + || (((negativePart.getConnections() & 0b00001100) == 0b00000000) && ((myPart.getConnections() & 0b00001100) == 0b00000000)) ) + && + ( ((((negativePart.getConnections() & 0b00000011) ^ (myPart.getConnections() & 0b00000011)) != 0b00000000) && (((myPart.getConnections() & 0b00000011) != 0b00000000) && (negativePart.getConnections() & 0b00000011) != 0b00000000)) + || ((((negativePart.getConnections() & 0b00000011) == 0b00000011) || ((myPart.getConnections() & 0b00000011) == 0b00000011)) && (((myPart.getConnections() & 0b00000011) != 0b00000000) && (negativePart.getConnections() & 0b00000011) != 0b00000000)) + || (((negativePart.getConnections() & 0b00000011) == 0b00000000) && ((myPart.getConnections() & 0b00000011) == 0b00000000)) ) + ) + { +#ifdef debug +cout << "good Part: "; +myPart.printPiece(); +cout << endl; +#endif + return 1; + } + + + + return 0; +} + + +//TODO!! +//simpler algorithm to the first placeofpartgood +//not yet functional!!! +bool Puzzle::PlaceOfPart2Good(unsigned int m,unsigned int n, PuzzlePiece& myPart) +{ + + PuzzlePiece negativePart(0); + + negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n+1).getConnections() & 0b11000000)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m-1,n).getConnections() & 0b00110000)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m,n-1).getConnections() & 0b00001100)); + negativePart.setConnections(negativePart.getConnections() | (getPiece(m+1,n).getConnections() & 0b00000011)); + negativePart.shift(2); + + //A and D or B and C or not A and not B and not C and not D + + if ( + ( ( (negativePart.getConnections() & 0b10000000) & (myPart.getConnections() & 0b01000000)) + || ( (negativePart.getConnections() & 0b01000000) & (myPart.getConnections() & 0b10000000)) + || ((!(negativePart.getConnections() & 0b10000000) & !(myPart.getConnections() & 0b10000000)) & (!(negativePart.getConnections() & 0b01000000) & !(myPart.getConnections() & 0b01000000))) + ) + && + ( ( (negativePart.getConnections() & 0b00100000) & (myPart.getConnections() & 0b00010000)) + || ( (negativePart.getConnections() & 0b00010000) & (myPart.getConnections() & 0b00100000)) + || ((!(negativePart.getConnections() & 0b00100000) & !(myPart.getConnections() & 0b00100000)) & (!(negativePart.getConnections() & 0b00010000) & !(myPart.getConnections() & 0b00010000))) + ) + && + ( ( (negativePart.getConnections() & 0b00001000) & (myPart.getConnections() & 0b00000100)) + || ( (negativePart.getConnections() & 0b00000100) & (myPart.getConnections() & 0b00001000)) + || ((!(negativePart.getConnections() & 0b00001000) & !(myPart.getConnections() & 0b00001000)) & (!(negativePart.getConnections() & 0b00000100) & !(myPart.getConnections() & 0b00000100))) + ) + && + ( ( (negativePart.getConnections() & 0b00000010) & (myPart.getConnections() & 0b00000001)) + || ( (negativePart.getConnections() & 0b00000001) & (myPart.getConnections() & 0b00000010)) + || ((!(negativePart.getConnections() & 0b00000010) & !(myPart.getConnections() & 0b00000010)) & (!(negativePart.getConnections() & 0b00000001) & !(myPart.getConnections() & 0b00000001))) + ) + ) + + return 1; + + cout << "nogood" << endl; + return 0; +} + +//prints the true puzzle (without 0 edges) +void Puzzle::printPuzzle() +{ + cout << "current Puzzle: " << endl; + for(int i=1;i::iterator i = Box.begin(); i != Box.end(); i++) + { + (*i).printPiece(); + cout << ' '; + } + cout << endl; +} + +//shuffles around a box, randomizing pieces and orientation +vector randomBox::shuffle() +{ + random_shuffle(Box.begin(),Box.end()); + for (vector::iterator i = Box.begin(); i != Box.end(); i++) + (*i).shift(rand()%4); + numerateBox(Box); + return Box; +} + +//creates a random box size m, n, shuffles it, and then retuns it +vector createBox(uint m, uint n) +{ + randomBox myFirstPuzzleBox(m,n); + myFirstPuzzleBox.createRandomPuzzle(); + return myFirstPuzzleBox.shuffle(); +} + +//prints contents of box +void printBox(vector myBox) +{ + cout << "current Box: " << endl; + for (vector::iterator i = myBox.begin(); i != myBox.end(); i++) + { + (*i).printPiece(); + cout << ' '; + } + cout << endl; + return; +} + +//gives every element in box a box identifier. +void numerateBox(vector& myBox) +{ + for(int i = 0; i< myBox.size();i++) + myBox[i].setBoxIdentifier(i); + + return; } \ No newline at end of file diff --git a/TeamCMU/Revision_02/test_puzzle.h b/Legacy/Revision_03/test_puzzle.h similarity index 97% rename from TeamCMU/Revision_02/test_puzzle.h rename to Legacy/Revision_03/test_puzzle.h index f893bf0..e7c1c1c 100644 --- a/TeamCMU/Revision_02/test_puzzle.h +++ b/Legacy/Revision_03/test_puzzle.h @@ -1,406 +1,406 @@ - - void create4040hardBox(vector& myFirstBox) -{ -myFirstBox[0].setConnections(0b01101001); -myFirstBox[1].setConnections(0b10011001); -myFirstBox[2].setConnections(0b01100110); -myFirstBox[3].setConnections(0b01101001); -myFirstBox[4].setConnections(0b10100101); -myFirstBox[5].setConnections(0b10010010); -myFirstBox[6].setConnections(0b01101001); -myFirstBox[7].setConnections(0b00101010); -myFirstBox[8].setConnections(0b01000110); -myFirstBox[9].setConnections(0b01011010); -myFirstBox[10].setConnections(0b01011010); -myFirstBox[11].setConnections(0b10010101); -myFirstBox[12].setConnections(0b01010101); -myFirstBox[13].setConnections(0b10101001); -myFirstBox[14].setConnections(0b10010101); -myFirstBox[15].setConnections(0b10101010); -myFirstBox[16].setConnections(0b01101010); -myFirstBox[17].setConnections(0b01101010); -myFirstBox[18].setConnections(0b00100101); -myFirstBox[19].setConnections(0b01100101); -myFirstBox[20].setConnections(0b10010001); -myFirstBox[21].setConnections(0b10010101); -myFirstBox[22].setConnections(0b10101001); -myFirstBox[23].setConnections(0b01010110); -myFirstBox[24].setConnections(0b10101010); -myFirstBox[25].setConnections(0b01101000); -myFirstBox[26].setConnections(0b01101010); -myFirstBox[27].setConnections(0b10010101); -myFirstBox[28].setConnections(0b10011010); -myFirstBox[29].setConnections(0b10011001); -myFirstBox[30].setConnections(0b01101010); -myFirstBox[31].setConnections(0b01100001); -myFirstBox[32].setConnections(0b01101010); -myFirstBox[33].setConnections(0b01100101); -myFirstBox[34].setConnections(0b01010101); -myFirstBox[35].setConnections(0b01010110); -myFirstBox[36].setConnections(0b01101010); -myFirstBox[37].setConnections(0b01010110); -myFirstBox[38].setConnections(0b01100110); -myFirstBox[39].setConnections(0b01011010); -myFirstBox[40].setConnections(0b01100101); -myFirstBox[41].setConnections(0b01101001); -myFirstBox[42].setConnections(0b01010110); -myFirstBox[43].setConnections(0b01000110); -myFirstBox[44].setConnections(0b01011001); -myFirstBox[45].setConnections(0b01101001); -myFirstBox[46].setConnections(0b10000101); -myFirstBox[47].setConnections(0b10011010); -myFirstBox[48].setConnections(0b10010110); -myFirstBox[49].setConnections(0b01011010); -myFirstBox[50].setConnections(0b10011001); -myFirstBox[51].setConnections(0b01001001); -myFirstBox[52].setConnections(0b10100110); -myFirstBox[53].setConnections(0b01001010); -myFirstBox[54].setConnections(0b10010010); -myFirstBox[55].setConnections(0b01001010); -myFirstBox[56].setConnections(0b01101001); -myFirstBox[57].setConnections(0b10100110); -myFirstBox[58].setConnections(0b10010110); -myFirstBox[59].setConnections(0b10010110); -myFirstBox[60].setConnections(0b10101001); -myFirstBox[61].setConnections(0b00100101); -myFirstBox[62].setConnections(0b00101001); -myFirstBox[63].setConnections(0b01101001); -myFirstBox[64].setConnections(0b01101001); -myFirstBox[65].setConnections(0b00100101); -myFirstBox[66].setConnections(0b10010110); -myFirstBox[67].setConnections(0b10011010); -myFirstBox[68].setConnections(0b01100110); -myFirstBox[69].setConnections(0b10010110); -myFirstBox[70].setConnections(0b01010100); -myFirstBox[71].setConnections(0b01011010); -myFirstBox[72].setConnections(0b01100110); -myFirstBox[73].setConnections(0b01100101); -myFirstBox[74].setConnections(0b10011010); -myFirstBox[75].setConnections(0b10010101); -myFirstBox[76].setConnections(0b10011010); -myFirstBox[77].setConnections(0b01100101); -myFirstBox[78].setConnections(0b10011010); -myFirstBox[79].setConnections(0b01010110); -myFirstBox[80].setConnections(0b01101010); -myFirstBox[81].setConnections(0b01010101); -myFirstBox[82].setConnections(0b01100101); -myFirstBox[83].setConnections(0b10100101); -myFirstBox[84].setConnections(0b01010110); -myFirstBox[85].setConnections(0b01101010); -myFirstBox[86].setConnections(0b10011010); -myFirstBox[87].setConnections(0b10010110); -myFirstBox[88].setConnections(0b01101010); -myFirstBox[89].setConnections(0b01011010); -myFirstBox[90].setConnections(0b01010110); -myFirstBox[91].setConnections(0b01100101); -myFirstBox[92].setConnections(0b00100101); -myFirstBox[93].setConnections(0b10100101); -myFirstBox[94].setConnections(0b10010110); -myFirstBox[95].setConnections(0b01100110); -myFirstBox[96].setConnections(0b10000110); -myFirstBox[97].setConnections(0b01001001); -myFirstBox[98].setConnections(0b10010110); -myFirstBox[99].setConnections(0b10100110); -myFirstBox[100].setConnections(0b10100110); -myFirstBox[101].setConnections(0b01100010); -myFirstBox[102].setConnections(0b01101010); -myFirstBox[103].setConnections(0b10011001); -myFirstBox[104].setConnections(0b01010101); -myFirstBox[105].setConnections(0b10011010); -myFirstBox[106].setConnections(0b10101001); -myFirstBox[107].setConnections(0b01100110); -myFirstBox[108].setConnections(0b10101001); -myFirstBox[109].setConnections(0b10101001); -myFirstBox[110].setConnections(0b10010100); -myFirstBox[111].setConnections(0b01100110); -myFirstBox[112].setConnections(0b01010110); -myFirstBox[113].setConnections(0b10010101); -myFirstBox[114].setConnections(0b01011001); -myFirstBox[115].setConnections(0b01101010); -myFirstBox[116].setConnections(0b10100110); -myFirstBox[117].setConnections(0b10100101); -myFirstBox[118].setConnections(0b10101010); -myFirstBox[119].setConnections(0b01011010); -myFirstBox[120].setConnections(0b10011000); -myFirstBox[121].setConnections(0b10010101); -myFirstBox[122].setConnections(0b10100101); -myFirstBox[123].setConnections(0b10000110); -myFirstBox[124].setConnections(0b01100101); -myFirstBox[125].setConnections(0b10100110); -myFirstBox[126].setConnections(0b10101010); -myFirstBox[127].setConnections(0b01101001); -myFirstBox[128].setConnections(0b01010101); -myFirstBox[129].setConnections(0b01100101); -myFirstBox[130].setConnections(0b10001001); -myFirstBox[131].setConnections(0b01101010); -myFirstBox[132].setConnections(0b01101010); -myFirstBox[133].setConnections(0b01100010); -myFirstBox[134].setConnections(0b01100110); -myFirstBox[135].setConnections(0b10100001); -myFirstBox[136].setConnections(0b10011001); -myFirstBox[137].setConnections(0b01101010); -myFirstBox[138].setConnections(0b01011001); -myFirstBox[139].setConnections(0b10001001); -myFirstBox[140].setConnections(0b01010101); -myFirstBox[141].setConnections(0b10100101); -myFirstBox[142].setConnections(0b01100101); -myFirstBox[143].setConnections(0b10100101); -myFirstBox[144].setConnections(0b10011010); -myFirstBox[145].setConnections(0b10010001); -myFirstBox[146].setConnections(0b10100110); -myFirstBox[147].setConnections(0b01101010); -myFirstBox[148].setConnections(0b10010101); -myFirstBox[149].setConnections(0b01100101); -myFirstBox[150].setConnections(0b10100101); -myFirstBox[151].setConnections(0b10100110); -myFirstBox[152].setConnections(0b10010001); -myFirstBox[153].setConnections(0b10101000); -myFirstBox[154].setConnections(0b10011010); -myFirstBox[155].setConnections(0b10100110); -myFirstBox[156].setConnections(0b01100110); -myFirstBox[157].setConnections(0b10100110); -myFirstBox[158].setConnections(0b01011010); -myFirstBox[159].setConnections(0b10100001); -myFirstBox[160].setConnections(0b01010101); -myFirstBox[161].setConnections(0b10011010); -myFirstBox[162].setConnections(0b10101001); -myFirstBox[163].setConnections(0b01010110); -myFirstBox[164].setConnections(0b01100001); -myFirstBox[165].setConnections(0b01011001); -myFirstBox[166].setConnections(0b01101001); -myFirstBox[167].setConnections(0b10011001); -myFirstBox[168].setConnections(0b10010101); -myFirstBox[169].setConnections(0b01100010); -myFirstBox[170].setConnections(0b01010110); -myFirstBox[171].setConnections(0b00010101); -myFirstBox[172].setConnections(0b10100101); -myFirstBox[173].setConnections(0b10101010); -myFirstBox[174].setConnections(0b10011010); -myFirstBox[175].setConnections(0b01100101); -myFirstBox[176].setConnections(0b10100110); -myFirstBox[177].setConnections(0b10101001); -myFirstBox[178].setConnections(0b01011010); -myFirstBox[179].setConnections(0b01101001); -myFirstBox[180].setConnections(0b10010101); -myFirstBox[181].setConnections(0b01101010); -myFirstBox[182].setConnections(0b10010110); -myFirstBox[183].setConnections(0b10010110); -myFirstBox[184].setConnections(0b10011001); -myFirstBox[185].setConnections(0b10100101); -myFirstBox[186].setConnections(0b10010110); -myFirstBox[187].setConnections(0b10010110); -myFirstBox[188].setConnections(0b10011010); -myFirstBox[189].setConnections(0b10010101); -myFirstBox[190].setConnections(0b01010001); -myFirstBox[191].setConnections(0b01010100); -myFirstBox[192].setConnections(0b10101000); -myFirstBox[193].setConnections(0b10100110); -myFirstBox[194].setConnections(0b01010001); -myFirstBox[195].setConnections(0b01010101); -myFirstBox[196].setConnections(0b01100110); -myFirstBox[197].setConnections(0b10100101); -myFirstBox[198].setConnections(0b00100101); -myFirstBox[199].setConnections(0b00100101); -myFirstBox[200].setConnections(0b10101001); -myFirstBox[201].setConnections(0b10101001); -myFirstBox[202].setConnections(0b01011001); -myFirstBox[203].setConnections(0b00001010); -myFirstBox[204].setConnections(0b01010101); -myFirstBox[205].setConnections(0b10011010); -myFirstBox[206].setConnections(0b10100110); -myFirstBox[207].setConnections(0b10100101); -myFirstBox[208].setConnections(0b10011001); -myFirstBox[209].setConnections(0b10100110); -myFirstBox[210].setConnections(0b10101010); -myFirstBox[211].setConnections(0b01010110); -myFirstBox[212].setConnections(0b01010101); -myFirstBox[213].setConnections(0b01100010); -myFirstBox[214].setConnections(0b10010110); -myFirstBox[215].setConnections(0b10011010); -myFirstBox[216].setConnections(0b01100100); -myFirstBox[217].setConnections(0b01010101); -myFirstBox[218].setConnections(0b10011010); -myFirstBox[219].setConnections(0b01100101); -myFirstBox[220].setConnections(0b10101001); -myFirstBox[221].setConnections(0b10010101); -myFirstBox[222].setConnections(0b10100101); -myFirstBox[223].setConnections(0b10101001); -myFirstBox[224].setConnections(0b10100110); -myFirstBox[225].setConnections(0b10011001); -myFirstBox[226].setConnections(0b01011010); -myFirstBox[227].setConnections(0b01000101); -myFirstBox[228].setConnections(0b01100110); -myFirstBox[229].setConnections(0b10101010); -myFirstBox[230].setConnections(0b01010100); -myFirstBox[231].setConnections(0b10101010); -myFirstBox[232].setConnections(0b10011010); -myFirstBox[233].setConnections(0b10100110); -myFirstBox[234].setConnections(0b10011000); -myFirstBox[235].setConnections(0b10011001); -myFirstBox[236].setConnections(0b01010101); -myFirstBox[237].setConnections(0b01001010); -myFirstBox[238].setConnections(0b01100001); -myFirstBox[239].setConnections(0b10011010); -myFirstBox[240].setConnections(0b10010101); -myFirstBox[241].setConnections(0b10100110); -myFirstBox[242].setConnections(0b01010101); -myFirstBox[243].setConnections(0b10010101); -myFirstBox[244].setConnections(0b01101010); -myFirstBox[245].setConnections(0b01101010); -myFirstBox[246].setConnections(0b10100100); -myFirstBox[247].setConnections(0b00101010); -myFirstBox[248].setConnections(0b01100110); -myFirstBox[249].setConnections(0b01101000); -myFirstBox[250].setConnections(0b01101001); -myFirstBox[251].setConnections(0b10101001); -myFirstBox[252].setConnections(0b01010110); -myFirstBox[253].setConnections(0b10010110); -myFirstBox[254].setConnections(0b01100101); -myFirstBox[255].setConnections(0b01011001); -myFirstBox[256].setConnections(0b01100110); -myFirstBox[257].setConnections(0b00100101); -myFirstBox[258].setConnections(0b01101001); -myFirstBox[259].setConnections(0b10010110); -myFirstBox[260].setConnections(0b10011001); -myFirstBox[261].setConnections(0b10011001); -myFirstBox[262].setConnections(0b01101001); -myFirstBox[263].setConnections(0b01010010); -myFirstBox[264].setConnections(0b10101010); -myFirstBox[265].setConnections(0b01101001); -myFirstBox[266].setConnections(0b01101001); -myFirstBox[267].setConnections(0b01101001); -myFirstBox[268].setConnections(0b10010110); -myFirstBox[269].setConnections(0b10011001); -myFirstBox[270].setConnections(0b01101010); -myFirstBox[271].setConnections(0b10000110); -myFirstBox[272].setConnections(0b10010101); -myFirstBox[273].setConnections(0b00010101); -myFirstBox[274].setConnections(0b10101010); -myFirstBox[275].setConnections(0b01010110); -myFirstBox[276].setConnections(0b01100100); -myFirstBox[277].setConnections(0b01010101); -myFirstBox[278].setConnections(0b10010101); -myFirstBox[279].setConnections(0b01010101); -myFirstBox[280].setConnections(0b01011010); -myFirstBox[281].setConnections(0b10011010); -myFirstBox[282].setConnections(0b00010101); -myFirstBox[283].setConnections(0b10010110); -myFirstBox[284].setConnections(0b10100101); -myFirstBox[285].setConnections(0b10010101); -myFirstBox[286].setConnections(0b01101001); -myFirstBox[287].setConnections(0b10100101); -myFirstBox[288].setConnections(0b01101001); -myFirstBox[289].setConnections(0b10011001); -myFirstBox[290].setConnections(0b01011001); -myFirstBox[291].setConnections(0b10010110); -myFirstBox[292].setConnections(0b01010101); -myFirstBox[293].setConnections(0b10100110); -myFirstBox[294].setConnections(0b10101001); -myFirstBox[295].setConnections(0b10101001); -myFirstBox[296].setConnections(0b01011010); -myFirstBox[297].setConnections(0b10100101); -myFirstBox[298].setConnections(0b01011010); -myFirstBox[299].setConnections(0b01100110); -myFirstBox[300].setConnections(0b10010101); -myFirstBox[301].setConnections(0b10101001); -myFirstBox[302].setConnections(0b10011001); -myFirstBox[303].setConnections(0b01010101); -myFirstBox[304].setConnections(0b01010101); -myFirstBox[305].setConnections(0b10101001); -myFirstBox[306].setConnections(0b01100101); -myFirstBox[307].setConnections(0b01101000); -myFirstBox[308].setConnections(0b01010101); -myFirstBox[309].setConnections(0b10010110); -myFirstBox[310].setConnections(0b10010110); -myFirstBox[311].setConnections(0b01011010); -myFirstBox[312].setConnections(0b10010110); -myFirstBox[313].setConnections(0b01011001); -myFirstBox[314].setConnections(0b01010110); -myFirstBox[315].setConnections(0b01101001); -myFirstBox[316].setConnections(0b10100101); -myFirstBox[317].setConnections(0b10101010); -myFirstBox[318].setConnections(0b10011001); -myFirstBox[319].setConnections(0b01010110); -myFirstBox[320].setConnections(0b10100000); -myFirstBox[321].setConnections(0b10100101); -myFirstBox[322].setConnections(0b00010101); -myFirstBox[323].setConnections(0b01010110); -myFirstBox[324].setConnections(0b01101010); -myFirstBox[325].setConnections(0b10010110); -myFirstBox[326].setConnections(0b00001001); -myFirstBox[327].setConnections(0b10011010); -myFirstBox[328].setConnections(0b10101010); -myFirstBox[329].setConnections(0b01100101); -myFirstBox[330].setConnections(0b01011010); -myFirstBox[331].setConnections(0b01101010); -myFirstBox[332].setConnections(0b10100101); -myFirstBox[333].setConnections(0b10100101); -myFirstBox[334].setConnections(0b01011000); -myFirstBox[335].setConnections(0b01010110); -myFirstBox[336].setConnections(0b00100110); -myFirstBox[337].setConnections(0b01101010); -myFirstBox[338].setConnections(0b01101010); -myFirstBox[339].setConnections(0b10010110); -myFirstBox[340].setConnections(0b10101010); -myFirstBox[341].setConnections(0b01100110); -myFirstBox[342].setConnections(0b10011000); -myFirstBox[343].setConnections(0b10101010); -myFirstBox[344].setConnections(0b01011001); -myFirstBox[345].setConnections(0b01101001); -myFirstBox[346].setConnections(0b10010101); -myFirstBox[347].setConnections(0b10101010); -myFirstBox[348].setConnections(0b10011001); -myFirstBox[349].setConnections(0b01101001); -myFirstBox[350].setConnections(0b01010110); -myFirstBox[351].setConnections(0b10000110); -myFirstBox[352].setConnections(0b10010110); -myFirstBox[353].setConnections(0b10011010); -myFirstBox[354].setConnections(0b01010110); -myFirstBox[355].setConnections(0b10010010); -myFirstBox[356].setConnections(0b10100110); -myFirstBox[357].setConnections(0b10101001); -myFirstBox[358].setConnections(0b01011001); -myFirstBox[359].setConnections(0b01010000); -myFirstBox[360].setConnections(0b10011001); -myFirstBox[361].setConnections(0b01101001); -myFirstBox[362].setConnections(0b01100001); -myFirstBox[363].setConnections(0b10100110); -myFirstBox[364].setConnections(0b10100101); -myFirstBox[365].setConnections(0b01100101); -myFirstBox[366].setConnections(0b01001010); -myFirstBox[367].setConnections(0b10010110); -myFirstBox[368].setConnections(0b10010101); -myFirstBox[369].setConnections(0b10010100); -myFirstBox[370].setConnections(0b01010101); -myFirstBox[371].setConnections(0b01011000); -myFirstBox[372].setConnections(0b01100010); -myFirstBox[373].setConnections(0b10011001); -myFirstBox[374].setConnections(0b01100110); -myFirstBox[375].setConnections(0b10100101); -myFirstBox[376].setConnections(0b01000110); -myFirstBox[377].setConnections(0b01010101); -myFirstBox[378].setConnections(0b01100110); -myFirstBox[379].setConnections(0b10100110); -myFirstBox[380].setConnections(0b00100110); -myFirstBox[381].setConnections(0b01101001); -myFirstBox[382].setConnections(0b01100101); -myFirstBox[383].setConnections(0b10010101); -myFirstBox[384].setConnections(0b01101001); -myFirstBox[385].setConnections(0b10010110); -myFirstBox[386].setConnections(0b10010101); -myFirstBox[387].setConnections(0b10101001); -myFirstBox[388].setConnections(0b10011001); -myFirstBox[389].setConnections(0b01010110); -myFirstBox[390].setConnections(0b10100010); -myFirstBox[391].setConnections(0b10101001); -myFirstBox[392].setConnections(0b01101010); -myFirstBox[393].setConnections(0b10101010); -myFirstBox[394].setConnections(0b01100110); -myFirstBox[395].setConnections(0b01010101); -myFirstBox[396].setConnections(0b01101001); -myFirstBox[397].setConnections(0b10010101); -myFirstBox[398].setConnections(0b10100110); -myFirstBox[399].setConnections(0b01101010); -return; - + + void create4040hardBox(vector& myFirstBox) +{ +myFirstBox[0].setConnections(0b01101001); +myFirstBox[1].setConnections(0b10011001); +myFirstBox[2].setConnections(0b01100110); +myFirstBox[3].setConnections(0b01101001); +myFirstBox[4].setConnections(0b10100101); +myFirstBox[5].setConnections(0b10010010); +myFirstBox[6].setConnections(0b01101001); +myFirstBox[7].setConnections(0b00101010); +myFirstBox[8].setConnections(0b01000110); +myFirstBox[9].setConnections(0b01011010); +myFirstBox[10].setConnections(0b01011010); +myFirstBox[11].setConnections(0b10010101); +myFirstBox[12].setConnections(0b01010101); +myFirstBox[13].setConnections(0b10101001); +myFirstBox[14].setConnections(0b10010101); +myFirstBox[15].setConnections(0b10101010); +myFirstBox[16].setConnections(0b01101010); +myFirstBox[17].setConnections(0b01101010); +myFirstBox[18].setConnections(0b00100101); +myFirstBox[19].setConnections(0b01100101); +myFirstBox[20].setConnections(0b10010001); +myFirstBox[21].setConnections(0b10010101); +myFirstBox[22].setConnections(0b10101001); +myFirstBox[23].setConnections(0b01010110); +myFirstBox[24].setConnections(0b10101010); +myFirstBox[25].setConnections(0b01101000); +myFirstBox[26].setConnections(0b01101010); +myFirstBox[27].setConnections(0b10010101); +myFirstBox[28].setConnections(0b10011010); +myFirstBox[29].setConnections(0b10011001); +myFirstBox[30].setConnections(0b01101010); +myFirstBox[31].setConnections(0b01100001); +myFirstBox[32].setConnections(0b01101010); +myFirstBox[33].setConnections(0b01100101); +myFirstBox[34].setConnections(0b01010101); +myFirstBox[35].setConnections(0b01010110); +myFirstBox[36].setConnections(0b01101010); +myFirstBox[37].setConnections(0b01010110); +myFirstBox[38].setConnections(0b01100110); +myFirstBox[39].setConnections(0b01011010); +myFirstBox[40].setConnections(0b01100101); +myFirstBox[41].setConnections(0b01101001); +myFirstBox[42].setConnections(0b01010110); +myFirstBox[43].setConnections(0b01000110); +myFirstBox[44].setConnections(0b01011001); +myFirstBox[45].setConnections(0b01101001); +myFirstBox[46].setConnections(0b10000101); +myFirstBox[47].setConnections(0b10011010); +myFirstBox[48].setConnections(0b10010110); +myFirstBox[49].setConnections(0b01011010); +myFirstBox[50].setConnections(0b10011001); +myFirstBox[51].setConnections(0b01001001); +myFirstBox[52].setConnections(0b10100110); +myFirstBox[53].setConnections(0b01001010); +myFirstBox[54].setConnections(0b10010010); +myFirstBox[55].setConnections(0b01001010); +myFirstBox[56].setConnections(0b01101001); +myFirstBox[57].setConnections(0b10100110); +myFirstBox[58].setConnections(0b10010110); +myFirstBox[59].setConnections(0b10010110); +myFirstBox[60].setConnections(0b10101001); +myFirstBox[61].setConnections(0b00100101); +myFirstBox[62].setConnections(0b00101001); +myFirstBox[63].setConnections(0b01101001); +myFirstBox[64].setConnections(0b01101001); +myFirstBox[65].setConnections(0b00100101); +myFirstBox[66].setConnections(0b10010110); +myFirstBox[67].setConnections(0b10011010); +myFirstBox[68].setConnections(0b01100110); +myFirstBox[69].setConnections(0b10010110); +myFirstBox[70].setConnections(0b01010100); +myFirstBox[71].setConnections(0b01011010); +myFirstBox[72].setConnections(0b01100110); +myFirstBox[73].setConnections(0b01100101); +myFirstBox[74].setConnections(0b10011010); +myFirstBox[75].setConnections(0b10010101); +myFirstBox[76].setConnections(0b10011010); +myFirstBox[77].setConnections(0b01100101); +myFirstBox[78].setConnections(0b10011010); +myFirstBox[79].setConnections(0b01010110); +myFirstBox[80].setConnections(0b01101010); +myFirstBox[81].setConnections(0b01010101); +myFirstBox[82].setConnections(0b01100101); +myFirstBox[83].setConnections(0b10100101); +myFirstBox[84].setConnections(0b01010110); +myFirstBox[85].setConnections(0b01101010); +myFirstBox[86].setConnections(0b10011010); +myFirstBox[87].setConnections(0b10010110); +myFirstBox[88].setConnections(0b01101010); +myFirstBox[89].setConnections(0b01011010); +myFirstBox[90].setConnections(0b01010110); +myFirstBox[91].setConnections(0b01100101); +myFirstBox[92].setConnections(0b00100101); +myFirstBox[93].setConnections(0b10100101); +myFirstBox[94].setConnections(0b10010110); +myFirstBox[95].setConnections(0b01100110); +myFirstBox[96].setConnections(0b10000110); +myFirstBox[97].setConnections(0b01001001); +myFirstBox[98].setConnections(0b10010110); +myFirstBox[99].setConnections(0b10100110); +myFirstBox[100].setConnections(0b10100110); +myFirstBox[101].setConnections(0b01100010); +myFirstBox[102].setConnections(0b01101010); +myFirstBox[103].setConnections(0b10011001); +myFirstBox[104].setConnections(0b01010101); +myFirstBox[105].setConnections(0b10011010); +myFirstBox[106].setConnections(0b10101001); +myFirstBox[107].setConnections(0b01100110); +myFirstBox[108].setConnections(0b10101001); +myFirstBox[109].setConnections(0b10101001); +myFirstBox[110].setConnections(0b10010100); +myFirstBox[111].setConnections(0b01100110); +myFirstBox[112].setConnections(0b01010110); +myFirstBox[113].setConnections(0b10010101); +myFirstBox[114].setConnections(0b01011001); +myFirstBox[115].setConnections(0b01101010); +myFirstBox[116].setConnections(0b10100110); +myFirstBox[117].setConnections(0b10100101); +myFirstBox[118].setConnections(0b10101010); +myFirstBox[119].setConnections(0b01011010); +myFirstBox[120].setConnections(0b10011000); +myFirstBox[121].setConnections(0b10010101); +myFirstBox[122].setConnections(0b10100101); +myFirstBox[123].setConnections(0b10000110); +myFirstBox[124].setConnections(0b01100101); +myFirstBox[125].setConnections(0b10100110); +myFirstBox[126].setConnections(0b10101010); +myFirstBox[127].setConnections(0b01101001); +myFirstBox[128].setConnections(0b01010101); +myFirstBox[129].setConnections(0b01100101); +myFirstBox[130].setConnections(0b10001001); +myFirstBox[131].setConnections(0b01101010); +myFirstBox[132].setConnections(0b01101010); +myFirstBox[133].setConnections(0b01100010); +myFirstBox[134].setConnections(0b01100110); +myFirstBox[135].setConnections(0b10100001); +myFirstBox[136].setConnections(0b10011001); +myFirstBox[137].setConnections(0b01101010); +myFirstBox[138].setConnections(0b01011001); +myFirstBox[139].setConnections(0b10001001); +myFirstBox[140].setConnections(0b01010101); +myFirstBox[141].setConnections(0b10100101); +myFirstBox[142].setConnections(0b01100101); +myFirstBox[143].setConnections(0b10100101); +myFirstBox[144].setConnections(0b10011010); +myFirstBox[145].setConnections(0b10010001); +myFirstBox[146].setConnections(0b10100110); +myFirstBox[147].setConnections(0b01101010); +myFirstBox[148].setConnections(0b10010101); +myFirstBox[149].setConnections(0b01100101); +myFirstBox[150].setConnections(0b10100101); +myFirstBox[151].setConnections(0b10100110); +myFirstBox[152].setConnections(0b10010001); +myFirstBox[153].setConnections(0b10101000); +myFirstBox[154].setConnections(0b10011010); +myFirstBox[155].setConnections(0b10100110); +myFirstBox[156].setConnections(0b01100110); +myFirstBox[157].setConnections(0b10100110); +myFirstBox[158].setConnections(0b01011010); +myFirstBox[159].setConnections(0b10100001); +myFirstBox[160].setConnections(0b01010101); +myFirstBox[161].setConnections(0b10011010); +myFirstBox[162].setConnections(0b10101001); +myFirstBox[163].setConnections(0b01010110); +myFirstBox[164].setConnections(0b01100001); +myFirstBox[165].setConnections(0b01011001); +myFirstBox[166].setConnections(0b01101001); +myFirstBox[167].setConnections(0b10011001); +myFirstBox[168].setConnections(0b10010101); +myFirstBox[169].setConnections(0b01100010); +myFirstBox[170].setConnections(0b01010110); +myFirstBox[171].setConnections(0b00010101); +myFirstBox[172].setConnections(0b10100101); +myFirstBox[173].setConnections(0b10101010); +myFirstBox[174].setConnections(0b10011010); +myFirstBox[175].setConnections(0b01100101); +myFirstBox[176].setConnections(0b10100110); +myFirstBox[177].setConnections(0b10101001); +myFirstBox[178].setConnections(0b01011010); +myFirstBox[179].setConnections(0b01101001); +myFirstBox[180].setConnections(0b10010101); +myFirstBox[181].setConnections(0b01101010); +myFirstBox[182].setConnections(0b10010110); +myFirstBox[183].setConnections(0b10010110); +myFirstBox[184].setConnections(0b10011001); +myFirstBox[185].setConnections(0b10100101); +myFirstBox[186].setConnections(0b10010110); +myFirstBox[187].setConnections(0b10010110); +myFirstBox[188].setConnections(0b10011010); +myFirstBox[189].setConnections(0b10010101); +myFirstBox[190].setConnections(0b01010001); +myFirstBox[191].setConnections(0b01010100); +myFirstBox[192].setConnections(0b10101000); +myFirstBox[193].setConnections(0b10100110); +myFirstBox[194].setConnections(0b01010001); +myFirstBox[195].setConnections(0b01010101); +myFirstBox[196].setConnections(0b01100110); +myFirstBox[197].setConnections(0b10100101); +myFirstBox[198].setConnections(0b00100101); +myFirstBox[199].setConnections(0b00100101); +myFirstBox[200].setConnections(0b10101001); +myFirstBox[201].setConnections(0b10101001); +myFirstBox[202].setConnections(0b01011001); +myFirstBox[203].setConnections(0b00001010); +myFirstBox[204].setConnections(0b01010101); +myFirstBox[205].setConnections(0b10011010); +myFirstBox[206].setConnections(0b10100110); +myFirstBox[207].setConnections(0b10100101); +myFirstBox[208].setConnections(0b10011001); +myFirstBox[209].setConnections(0b10100110); +myFirstBox[210].setConnections(0b10101010); +myFirstBox[211].setConnections(0b01010110); +myFirstBox[212].setConnections(0b01010101); +myFirstBox[213].setConnections(0b01100010); +myFirstBox[214].setConnections(0b10010110); +myFirstBox[215].setConnections(0b10011010); +myFirstBox[216].setConnections(0b01100100); +myFirstBox[217].setConnections(0b01010101); +myFirstBox[218].setConnections(0b10011010); +myFirstBox[219].setConnections(0b01100101); +myFirstBox[220].setConnections(0b10101001); +myFirstBox[221].setConnections(0b10010101); +myFirstBox[222].setConnections(0b10100101); +myFirstBox[223].setConnections(0b10101001); +myFirstBox[224].setConnections(0b10100110); +myFirstBox[225].setConnections(0b10011001); +myFirstBox[226].setConnections(0b01011010); +myFirstBox[227].setConnections(0b01000101); +myFirstBox[228].setConnections(0b01100110); +myFirstBox[229].setConnections(0b10101010); +myFirstBox[230].setConnections(0b01010100); +myFirstBox[231].setConnections(0b10101010); +myFirstBox[232].setConnections(0b10011010); +myFirstBox[233].setConnections(0b10100110); +myFirstBox[234].setConnections(0b10011000); +myFirstBox[235].setConnections(0b10011001); +myFirstBox[236].setConnections(0b01010101); +myFirstBox[237].setConnections(0b01001010); +myFirstBox[238].setConnections(0b01100001); +myFirstBox[239].setConnections(0b10011010); +myFirstBox[240].setConnections(0b10010101); +myFirstBox[241].setConnections(0b10100110); +myFirstBox[242].setConnections(0b01010101); +myFirstBox[243].setConnections(0b10010101); +myFirstBox[244].setConnections(0b01101010); +myFirstBox[245].setConnections(0b01101010); +myFirstBox[246].setConnections(0b10100100); +myFirstBox[247].setConnections(0b00101010); +myFirstBox[248].setConnections(0b01100110); +myFirstBox[249].setConnections(0b01101000); +myFirstBox[250].setConnections(0b01101001); +myFirstBox[251].setConnections(0b10101001); +myFirstBox[252].setConnections(0b01010110); +myFirstBox[253].setConnections(0b10010110); +myFirstBox[254].setConnections(0b01100101); +myFirstBox[255].setConnections(0b01011001); +myFirstBox[256].setConnections(0b01100110); +myFirstBox[257].setConnections(0b00100101); +myFirstBox[258].setConnections(0b01101001); +myFirstBox[259].setConnections(0b10010110); +myFirstBox[260].setConnections(0b10011001); +myFirstBox[261].setConnections(0b10011001); +myFirstBox[262].setConnections(0b01101001); +myFirstBox[263].setConnections(0b01010010); +myFirstBox[264].setConnections(0b10101010); +myFirstBox[265].setConnections(0b01101001); +myFirstBox[266].setConnections(0b01101001); +myFirstBox[267].setConnections(0b01101001); +myFirstBox[268].setConnections(0b10010110); +myFirstBox[269].setConnections(0b10011001); +myFirstBox[270].setConnections(0b01101010); +myFirstBox[271].setConnections(0b10000110); +myFirstBox[272].setConnections(0b10010101); +myFirstBox[273].setConnections(0b00010101); +myFirstBox[274].setConnections(0b10101010); +myFirstBox[275].setConnections(0b01010110); +myFirstBox[276].setConnections(0b01100100); +myFirstBox[277].setConnections(0b01010101); +myFirstBox[278].setConnections(0b10010101); +myFirstBox[279].setConnections(0b01010101); +myFirstBox[280].setConnections(0b01011010); +myFirstBox[281].setConnections(0b10011010); +myFirstBox[282].setConnections(0b00010101); +myFirstBox[283].setConnections(0b10010110); +myFirstBox[284].setConnections(0b10100101); +myFirstBox[285].setConnections(0b10010101); +myFirstBox[286].setConnections(0b01101001); +myFirstBox[287].setConnections(0b10100101); +myFirstBox[288].setConnections(0b01101001); +myFirstBox[289].setConnections(0b10011001); +myFirstBox[290].setConnections(0b01011001); +myFirstBox[291].setConnections(0b10010110); +myFirstBox[292].setConnections(0b01010101); +myFirstBox[293].setConnections(0b10100110); +myFirstBox[294].setConnections(0b10101001); +myFirstBox[295].setConnections(0b10101001); +myFirstBox[296].setConnections(0b01011010); +myFirstBox[297].setConnections(0b10100101); +myFirstBox[298].setConnections(0b01011010); +myFirstBox[299].setConnections(0b01100110); +myFirstBox[300].setConnections(0b10010101); +myFirstBox[301].setConnections(0b10101001); +myFirstBox[302].setConnections(0b10011001); +myFirstBox[303].setConnections(0b01010101); +myFirstBox[304].setConnections(0b01010101); +myFirstBox[305].setConnections(0b10101001); +myFirstBox[306].setConnections(0b01100101); +myFirstBox[307].setConnections(0b01101000); +myFirstBox[308].setConnections(0b01010101); +myFirstBox[309].setConnections(0b10010110); +myFirstBox[310].setConnections(0b10010110); +myFirstBox[311].setConnections(0b01011010); +myFirstBox[312].setConnections(0b10010110); +myFirstBox[313].setConnections(0b01011001); +myFirstBox[314].setConnections(0b01010110); +myFirstBox[315].setConnections(0b01101001); +myFirstBox[316].setConnections(0b10100101); +myFirstBox[317].setConnections(0b10101010); +myFirstBox[318].setConnections(0b10011001); +myFirstBox[319].setConnections(0b01010110); +myFirstBox[320].setConnections(0b10100000); +myFirstBox[321].setConnections(0b10100101); +myFirstBox[322].setConnections(0b00010101); +myFirstBox[323].setConnections(0b01010110); +myFirstBox[324].setConnections(0b01101010); +myFirstBox[325].setConnections(0b10010110); +myFirstBox[326].setConnections(0b00001001); +myFirstBox[327].setConnections(0b10011010); +myFirstBox[328].setConnections(0b10101010); +myFirstBox[329].setConnections(0b01100101); +myFirstBox[330].setConnections(0b01011010); +myFirstBox[331].setConnections(0b01101010); +myFirstBox[332].setConnections(0b10100101); +myFirstBox[333].setConnections(0b10100101); +myFirstBox[334].setConnections(0b01011000); +myFirstBox[335].setConnections(0b01010110); +myFirstBox[336].setConnections(0b00100110); +myFirstBox[337].setConnections(0b01101010); +myFirstBox[338].setConnections(0b01101010); +myFirstBox[339].setConnections(0b10010110); +myFirstBox[340].setConnections(0b10101010); +myFirstBox[341].setConnections(0b01100110); +myFirstBox[342].setConnections(0b10011000); +myFirstBox[343].setConnections(0b10101010); +myFirstBox[344].setConnections(0b01011001); +myFirstBox[345].setConnections(0b01101001); +myFirstBox[346].setConnections(0b10010101); +myFirstBox[347].setConnections(0b10101010); +myFirstBox[348].setConnections(0b10011001); +myFirstBox[349].setConnections(0b01101001); +myFirstBox[350].setConnections(0b01010110); +myFirstBox[351].setConnections(0b10000110); +myFirstBox[352].setConnections(0b10010110); +myFirstBox[353].setConnections(0b10011010); +myFirstBox[354].setConnections(0b01010110); +myFirstBox[355].setConnections(0b10010010); +myFirstBox[356].setConnections(0b10100110); +myFirstBox[357].setConnections(0b10101001); +myFirstBox[358].setConnections(0b01011001); +myFirstBox[359].setConnections(0b01010000); +myFirstBox[360].setConnections(0b10011001); +myFirstBox[361].setConnections(0b01101001); +myFirstBox[362].setConnections(0b01100001); +myFirstBox[363].setConnections(0b10100110); +myFirstBox[364].setConnections(0b10100101); +myFirstBox[365].setConnections(0b01100101); +myFirstBox[366].setConnections(0b01001010); +myFirstBox[367].setConnections(0b10010110); +myFirstBox[368].setConnections(0b10010101); +myFirstBox[369].setConnections(0b10010100); +myFirstBox[370].setConnections(0b01010101); +myFirstBox[371].setConnections(0b01011000); +myFirstBox[372].setConnections(0b01100010); +myFirstBox[373].setConnections(0b10011001); +myFirstBox[374].setConnections(0b01100110); +myFirstBox[375].setConnections(0b10100101); +myFirstBox[376].setConnections(0b01000110); +myFirstBox[377].setConnections(0b01010101); +myFirstBox[378].setConnections(0b01100110); +myFirstBox[379].setConnections(0b10100110); +myFirstBox[380].setConnections(0b00100110); +myFirstBox[381].setConnections(0b01101001); +myFirstBox[382].setConnections(0b01100101); +myFirstBox[383].setConnections(0b10010101); +myFirstBox[384].setConnections(0b01101001); +myFirstBox[385].setConnections(0b10010110); +myFirstBox[386].setConnections(0b10010101); +myFirstBox[387].setConnections(0b10101001); +myFirstBox[388].setConnections(0b10011001); +myFirstBox[389].setConnections(0b01010110); +myFirstBox[390].setConnections(0b10100010); +myFirstBox[391].setConnections(0b10101001); +myFirstBox[392].setConnections(0b01101010); +myFirstBox[393].setConnections(0b10101010); +myFirstBox[394].setConnections(0b01100110); +myFirstBox[395].setConnections(0b01010101); +myFirstBox[396].setConnections(0b01101001); +myFirstBox[397].setConnections(0b10010101); +myFirstBox[398].setConnections(0b10100110); +myFirstBox[399].setConnections(0b01101010); +return; + } \ No newline at end of file diff --git a/Legacy/Revision_03/test_puzzle_long40x40.h b/Legacy/Revision_03/test_puzzle_long40x40.h new file mode 100644 index 0000000..e964f26 --- /dev/null +++ b/Legacy/Revision_03/test_puzzle_long40x40.h @@ -0,0 +1,400 @@ +myFirstBox[0].setConections(01101001); +myFirstBox[1].setConections(10011001); +myFirstBox[2].setConections(01100110); +myFirstBox[3].setConections(01101001); +myFirstBox[4].setConections(10100101); +myFirstBox[5].setConections(10010010); +myFirstBox[6].setConections(01101001); +myFirstBox[7].setConections(00101010); +myFirstBox[8].setConections(01000110); +myFirstBox[9].setConections(01011010); +myFirstBox[10].setConections(01011010); +myFirstBox[11].setConections(10010101); +myFirstBox[12].setConections(01010101); +myFirstBox[13].setConections(10101001); +myFirstBox[14].setConections(10010101); +myFirstBox[15].setConections(10101010); +myFirstBox[16].setConections(01101010); +myFirstBox[17].setConections(01101010); +myFirstBox[18].setConections(00100101); +myFirstBox[19].setConections(01100101); +myFirstBox[20].setConections(10010001); +myFirstBox[21].setConections(10010101); +myFirstBox[22].setConections(10101001); +myFirstBox[23].setConections(01010110); +myFirstBox[24].setConections(10101010); +myFirstBox[25].setConections(01101000); +myFirstBox[26].setConections(01101010); +myFirstBox[27].setConections(10010101); +myFirstBox[28].setConections(10011010); +myFirstBox[29].setConections(10011001); +myFirstBox[30].setConections(01101010); +myFirstBox[31].setConections(01100001); +myFirstBox[32].setConections(01101010); +myFirstBox[33].setConections(01100101); +myFirstBox[34].setConections(01010101); +myFirstBox[35].setConections(01010110); +myFirstBox[36].setConections(01101010); +myFirstBox[37].setConections(01010110); +myFirstBox[38].setConections(01100110); +myFirstBox[39].setConections(01011010); +myFirstBox[40].setConections(01100101); +myFirstBox[41].setConections(01101001); +myFirstBox[42].setConections(01010110); +myFirstBox[43].setConections(01000110); +myFirstBox[44].setConections(01011001); +myFirstBox[45].setConections(01101001); +myFirstBox[46].setConections(10000101); +myFirstBox[47].setConections(10011010); +myFirstBox[48].setConections(10010110); +myFirstBox[49].setConections(01011010); +myFirstBox[50].setConections(10011001); +myFirstBox[51].setConections(01001001); +myFirstBox[52].setConections(10100110); +myFirstBox[53].setConections(01001010); +myFirstBox[54].setConections(10010010); +myFirstBox[55].setConections(01001010); +myFirstBox[56].setConections(01101001); +myFirstBox[57].setConections(10100110); +myFirstBox[58].setConections(10010110); +myFirstBox[59].setConections(10010110); +myFirstBox[60].setConections(10101001); +myFirstBox[61].setConections(00100101); +myFirstBox[62].setConections(00101001); +myFirstBox[63].setConections(01101001); +myFirstBox[64].setConections(01101001); +myFirstBox[65].setConections(00100101); +myFirstBox[66].setConections(10010110); +myFirstBox[67].setConections(10011010); +myFirstBox[68].setConections(01100110); +myFirstBox[69].setConections(10010110); +myFirstBox[70].setConections(01010100); +myFirstBox[71].setConections(01011010); +myFirstBox[72].setConections(01100110); +myFirstBox[73].setConections(01100101); +myFirstBox[74].setConections(10011010); +myFirstBox[75].setConections(10010101); +myFirstBox[76].setConections(10011010); +myFirstBox[77].setConections(01100101); +myFirstBox[78].setConections(10011010); +myFirstBox[79].setConections(01010110); +myFirstBox[80].setConections(01101010); +myFirstBox[81].setConections(01010101); +myFirstBox[82].setConections(01100101); +myFirstBox[83].setConections(10100101); +myFirstBox[84].setConections(01010110); +myFirstBox[85].setConections(01101010); +myFirstBox[86].setConections(10011010); +myFirstBox[87].setConections(10010110); +myFirstBox[88].setConections(01101010); +myFirstBox[89].setConections(01011010); +myFirstBox[90].setConections(01010110); +myFirstBox[91].setConections(01100101); +myFirstBox[92].setConections(00100101); +myFirstBox[93].setConections(10100101); +myFirstBox[94].setConections(10010110); +myFirstBox[95].setConections(01100110); +myFirstBox[96].setConections(10000110); +myFirstBox[97].setConections(01001001); +myFirstBox[98].setConections(10010110); +myFirstBox[99].setConections(10100110); +myFirstBox[100].setConections(10100110); +myFirstBox[101].setConections(01100010); +myFirstBox[102].setConections(01101010); +myFirstBox[103].setConections(10011001); +myFirstBox[104].setConections(01010101); +myFirstBox[105].setConections(10011010); +myFirstBox[106].setConections(10101001); +myFirstBox[107].setConections(01100110); +myFirstBox[108].setConections(10101001); +myFirstBox[109].setConections(10101001); +myFirstBox[110].setConections(10010100); +myFirstBox[111].setConections(01100110); +myFirstBox[112].setConections(01010110); +myFirstBox[113].setConections(10010101); +myFirstBox[114].setConections(01011001); +myFirstBox[115].setConections(01101010); +myFirstBox[116].setConections(10100110); +myFirstBox[117].setConections(10100101); +myFirstBox[118].setConections(10101010); +myFirstBox[119].setConections(01011010); +myFirstBox[120].setConections(10011000); +myFirstBox[121].setConections(10010101); +myFirstBox[122].setConections(10100101); +myFirstBox[123].setConections(10000110); +myFirstBox[124].setConections(01100101); +myFirstBox[125].setConections(10100110); +myFirstBox[126].setConections(10101010); +myFirstBox[127].setConections(01101001); +myFirstBox[128].setConections(01010101); +myFirstBox[129].setConections(01100101); +myFirstBox[130].setConections(10001001); +myFirstBox[131].setConections(01101010); +myFirstBox[132].setConections(01101010); +myFirstBox[133].setConections(01100010); +myFirstBox[134].setConections(01100110); +myFirstBox[135].setConections(10100001); +myFirstBox[136].setConections(10011001); +myFirstBox[137].setConections(01101010); +myFirstBox[138].setConections(01011001); +myFirstBox[139].setConections(10001001); +myFirstBox[140].setConections(01010101); +myFirstBox[141].setConections(10100101); +myFirstBox[142].setConections(01100101); +myFirstBox[143].setConections(10100101); +myFirstBox[144].setConections(10011010); +myFirstBox[145].setConections(10010001); +myFirstBox[146].setConections(10100110); +myFirstBox[147].setConections(01101010); +myFirstBox[148].setConections(10010101); +myFirstBox[149].setConections(01100101); +myFirstBox[150].setConections(10100101); +myFirstBox[151].setConections(10100110); +myFirstBox[152].setConections(10010001); +myFirstBox[153].setConections(10101000); +myFirstBox[154].setConections(10011010); +myFirstBox[155].setConections(10100110); +myFirstBox[156].setConections(01100110); +myFirstBox[157].setConections(10100110); +myFirstBox[158].setConections(01011010); +myFirstBox[159].setConections(10100001); +myFirstBox[160].setConections(01010101); +myFirstBox[161].setConections(10011010); +myFirstBox[162].setConections(10101001); +myFirstBox[163].setConections(01010110); +myFirstBox[164].setConections(01100001); +myFirstBox[165].setConections(01011001); +myFirstBox[166].setConections(01101001); +myFirstBox[167].setConections(10011001); +myFirstBox[168].setConections(10010101); +myFirstBox[169].setConections(01100010); +myFirstBox[170].setConections(01010110); +myFirstBox[171].setConections(00010101); +myFirstBox[172].setConections(10100101); +myFirstBox[173].setConections(10101010); +myFirstBox[174].setConections(10011010); +myFirstBox[175].setConections(01100101); +myFirstBox[176].setConections(10100110); +myFirstBox[177].setConections(10101001); +myFirstBox[178].setConections(01011010); +myFirstBox[179].setConections(01101001); +myFirstBox[180].setConections(10010101); +myFirstBox[181].setConections(01101010); +myFirstBox[182].setConections(10010110); +myFirstBox[183].setConections(10010110); +myFirstBox[184].setConections(10011001); +myFirstBox[185].setConections(10100101); +myFirstBox[186].setConections(10010110); +myFirstBox[187].setConections(10010110); +myFirstBox[188].setConections(10011010); +myFirstBox[189].setConections(10010101); +myFirstBox[190].setConections(01010001); +myFirstBox[191].setConections(01010100); +myFirstBox[192].setConections(10101000); +myFirstBox[193].setConections(10100110); +myFirstBox[194].setConections(01010001); +myFirstBox[195].setConections(01010101); +myFirstBox[196].setConections(01100110); +myFirstBox[197].setConections(10100101); +myFirstBox[198].setConections(00100101); +myFirstBox[199].setConections(00100101); +myFirstBox[200].setConections(10101001); +myFirstBox[201].setConections(10101001); +myFirstBox[202].setConections(01011001); +myFirstBox[203].setConections(00001010); +myFirstBox[204].setConections(01010101); +myFirstBox[205].setConections(10011010); +myFirstBox[206].setConections(10100110); +myFirstBox[207].setConections(10100101); +myFirstBox[208].setConections(10011001); +myFirstBox[209].setConections(10100110); +myFirstBox[210].setConections(10101010); +myFirstBox[211].setConections(01010110); +myFirstBox[212].setConections(01010101); +myFirstBox[213].setConections(01100010); +myFirstBox[214].setConections(10010110); +myFirstBox[215].setConections(10011010); +myFirstBox[216].setConections(01100100); +myFirstBox[217].setConections(01010101); +myFirstBox[218].setConections(10011010); +myFirstBox[219].setConections(01100101); +myFirstBox[220].setConections(10101001); +myFirstBox[221].setConections(10010101); +myFirstBox[222].setConections(10100101); +myFirstBox[223].setConections(10101001); +myFirstBox[224].setConections(10100110); +myFirstBox[225].setConections(10011001); +myFirstBox[226].setConections(01011010); +myFirstBox[227].setConections(01000101); +myFirstBox[228].setConections(01100110); +myFirstBox[229].setConections(10101010); +myFirstBox[230].setConections(01010100); +myFirstBox[231].setConections(10101010); +myFirstBox[232].setConections(10011010); +myFirstBox[233].setConections(10100110); +myFirstBox[234].setConections(10011000); +myFirstBox[235].setConections(10011001); +myFirstBox[236].setConections(01010101); +myFirstBox[237].setConections(01001010); +myFirstBox[238].setConections(01100001); +myFirstBox[239].setConections(10011010); +myFirstBox[240].setConections(10010101); +myFirstBox[241].setConections(10100110); +myFirstBox[242].setConections(01010101); +myFirstBox[243].setConections(10010101); +myFirstBox[244].setConections(01101010); +myFirstBox[245].setConections(01101010); +myFirstBox[246].setConections(10100100); +myFirstBox[247].setConections(00101010); +myFirstBox[248].setConections(01100110); +myFirstBox[249].setConections(01101000); +myFirstBox[250].setConections(01101001); +myFirstBox[251].setConections(10101001); +myFirstBox[252].setConections(01010110); +myFirstBox[253].setConections(10010110); +myFirstBox[254].setConections(01100101); +myFirstBox[255].setConections(01011001); +myFirstBox[256].setConections(01100110); +myFirstBox[257].setConections(00100101); +myFirstBox[258].setConections(01101001); +myFirstBox[259].setConections(10010110); +myFirstBox[260].setConections(10011001); +myFirstBox[261].setConections(10011001); +myFirstBox[262].setConections(01101001); +myFirstBox[263].setConections(01010010); +myFirstBox[264].setConections(10101010); +myFirstBox[265].setConections(01101001); +myFirstBox[266].setConections(01101001); +myFirstBox[267].setConections(01101001); +myFirstBox[268].setConections(10010110); +myFirstBox[269].setConections(10011001); +myFirstBox[270].setConections(01101010); +myFirstBox[271].setConections(10000110); +myFirstBox[272].setConections(10010101); +myFirstBox[273].setConections(00010101); +myFirstBox[274].setConections(10101010); +myFirstBox[275].setConections(01010110); +myFirstBox[276].setConections(01100100); +myFirstBox[277].setConections(01010101); +myFirstBox[278].setConections(10010101); +myFirstBox[279].setConections(01010101); +myFirstBox[280].setConections(01011010); +myFirstBox[281].setConections(10011010); +myFirstBox[282].setConections(00010101); +myFirstBox[283].setConections(10010110); +myFirstBox[284].setConections(10100101); +myFirstBox[285].setConections(10010101); +myFirstBox[286].setConections(01101001); +myFirstBox[287].setConections(10100101); +myFirstBox[288].setConections(01101001); +myFirstBox[289].setConections(10011001); +myFirstBox[290].setConections(01011001); +myFirstBox[291].setConections(10010110); +myFirstBox[292].setConections(01010101); +myFirstBox[293].setConections(10100110); +myFirstBox[294].setConections(10101001); +myFirstBox[295].setConections(10101001); +myFirstBox[296].setConections(01011010); +myFirstBox[297].setConections(10100101); +myFirstBox[298].setConections(01011010); +myFirstBox[299].setConections(01100110); +myFirstBox[300].setConections(10010101); +myFirstBox[301].setConections(10101001); +myFirstBox[302].setConections(10011001); +myFirstBox[303].setConections(01010101); +myFirstBox[304].setConections(01010101); +myFirstBox[305].setConections(10101001); +myFirstBox[306].setConections(01100101); +myFirstBox[307].setConections(01101000); +myFirstBox[308].setConections(01010101); +myFirstBox[309].setConections(10010110); +myFirstBox[310].setConections(10010110); +myFirstBox[311].setConections(01011010); +myFirstBox[312].setConections(10010110); +myFirstBox[313].setConections(01011001); +myFirstBox[314].setConections(01010110); +myFirstBox[315].setConections(01101001); +myFirstBox[316].setConections(10100101); +myFirstBox[317].setConections(10101010); +myFirstBox[318].setConections(10011001); +myFirstBox[319].setConections(01010110); +myFirstBox[320].setConections(10100000); +myFirstBox[321].setConections(10100101); +myFirstBox[322].setConections(00010101); +myFirstBox[323].setConections(01010110); +myFirstBox[324].setConections(01101010); +myFirstBox[325].setConections(10010110); +myFirstBox[326].setConections(00001001); +myFirstBox[327].setConections(10011010); +myFirstBox[328].setConections(10101010); +myFirstBox[329].setConections(01100101); +myFirstBox[330].setConections(01011010); +myFirstBox[331].setConections(01101010); +myFirstBox[332].setConections(10100101); +myFirstBox[333].setConections(10100101); +myFirstBox[334].setConections(01011000); +myFirstBox[335].setConections(01010110); +myFirstBox[336].setConections(00100110); +myFirstBox[337].setConections(01101010); +myFirstBox[338].setConections(01101010); +myFirstBox[339].setConections(10010110); +myFirstBox[340].setConections(10101010); +myFirstBox[341].setConections(01100110); +myFirstBox[342].setConections(10011000); +myFirstBox[343].setConections(10101010); +myFirstBox[344].setConections(01011001); +myFirstBox[345].setConections(01101001); +myFirstBox[346].setConections(10010101); +myFirstBox[347].setConections(10101010); +myFirstBox[348].setConections(10011001); +myFirstBox[349].setConections(01101001); +myFirstBox[350].setConections(01010110); +myFirstBox[351].setConections(10000110); +myFirstBox[352].setConections(10010110); +myFirstBox[353].setConections(10011010); +myFirstBox[354].setConections(01010110); +myFirstBox[355].setConections(10010010); +myFirstBox[356].setConections(10100110); +myFirstBox[357].setConections(10101001); +myFirstBox[358].setConections(01011001); +myFirstBox[359].setConections(01010000); +myFirstBox[360].setConections(10011001); +myFirstBox[361].setConections(01101001); +myFirstBox[362].setConections(01100001); +myFirstBox[363].setConections(10100110); +myFirstBox[364].setConections(10100101); +myFirstBox[365].setConections(01100101); +myFirstBox[366].setConections(01001010); +myFirstBox[367].setConections(10010110); +myFirstBox[368].setConections(10010101); +myFirstBox[369].setConections(10010100); +myFirstBox[370].setConections(01010101); +myFirstBox[371].setConections(01011000); +myFirstBox[372].setConections(01100010); +myFirstBox[373].setConections(10011001); +myFirstBox[374].setConections(01100110); +myFirstBox[375].setConections(10100101); +myFirstBox[376].setConections(01000110); +myFirstBox[377].setConections(01010101); +myFirstBox[378].setConections(01100110); +myFirstBox[379].setConections(10100110); +myFirstBox[380].setConections(00100110); +myFirstBox[381].setConections(01101001); +myFirstBox[382].setConections(01100101); +myFirstBox[383].setConections(10010101); +myFirstBox[384].setConections(01101001); +myFirstBox[385].setConections(10010110); +myFirstBox[386].setConections(10010101); +myFirstBox[387].setConections(10101001); +myFirstBox[388].setConections(10011001); +myFirstBox[389].setConections(01010110); +myFirstBox[390].setConections(10100010); +myFirstBox[391].setConections(10101001); +myFirstBox[392].setConections(01101010); +myFirstBox[393].setConections(10101010); +myFirstBox[394].setConections(01100110); +myFirstBox[395].setConections(01010101); +myFirstBox[396].setConections(01101001); +myFirstBox[397].setConections(10010101); +myFirstBox[398].setConections(10100110); +myFirstBox[399].setConections(01101010); diff --git a/Source/a.out b/Source/a.out index 2d32f8d66db9dd9246c3ba0a399ed4737ebd0fc5..4dbeed2bcdf51c1dc35e2a079f4cae12a5a86a39 100644 GIT binary patch literal 57392 zcmd_Tdtg-6wFi9i!l+0hzPM<0K(L4yGa-baR)@#nL=sH%poou2NCt@JL6ZptDvAay zV}NoMy|h(JTd$Yf(w5s=np(y1D4~|y#@58^E6ecj@M{A=oKudc6aY;C)`t+3$gg8ZD8rkp(PH_0d7o90(?OWKY;lt}0E z@gJF-=xu4=eC3Z7S8Vug?YhEe|MrQIfzjW)glOaNAIVVt%C^R(WOMU`A5ZjuzI*1R z;IE3$-!^jgs-nAh1C{joB5ICKKqWnW3GkOC!T%tMoV7{t;UxHp=wKp!?tq~Z;RloO zzmo*tnnce3qF;&RPfgO_sY&FYm84&-N%(I`BLAC7^!&FZ_}?dy|4I`4Ka%wK%p~&X zB*A|^Nq>Kxq}{qC?Ov9I|M?{NKPJ(K;%TCBd_9Sr=Y>BvI{?j`=lA$Xa+YTW93(#7 z4LRpp7hAsjs~E3lo@L!Ea;iLXEX0GBXl>0^S5XWou)^V`4NZ;VmS}ZzG#s|VH?Ihn zMV8jJL?g|!>#JK@A}v<9sG=lX8)+7FMak^?rp8D`_2T-7q9vv*Dv#E;6xEbR{r;L| z)y?5(b9G%5h+ug&{shZFn7X*SrLHF2)DmruR5uh=ge!8x!Sd&$73hSC$!l)L>FKVod z&hZCVFutk2C0IJQth}i_ER~Zql2q#gn51rLW3ZuyEZ5c+ULI*~X=<#luZyk=*6=F)j+Y*Ax%1M}oZ8f)tlnROV87KmBIRLUN#0fZUt&uDFl zgqKv;M50ATCt%kK42f-NR>Kd=DODF&*M_U>F$l`W9@}GB2+zJS)D;rxTvGubm=>l! zC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=dds^=@^bE_ z$=GJ(Br8jdg;ZKYYE5r5$!w0QsdJx|A!?2E(9?2_*hHBmatzdD`xW#%lO6t?y%zV| z)N=leo0Zbk;wgh3tDo)<24mRUL_2w5pn;aNs5McAWZl>U8!-hdd1s!Li*n}BOp2F# zO!EtQCS+(+7ji07q48OK##rZ$6l~VaXHmT7Va_#Z*sY+)c&m@x@@K!k$Fg}xY(s^7 zXHe!T!`>8}FxI{?$C75vO2{G{Y71QuuX0O{7PYF|CKG|q;q=aiUT=up=LZ^l18Bc$Zj^B~pa z6cncf#&c1MPr+M2r)Q2-T|GA<-pmBrHkK#*$xdZIqqVKLAXAmRdcGvZ?Yo%K>Oa;0 zyIFn(^Qq@hD!3u_oE6E_GYhJHC4V1q6jNj$74@9iUfe&WqVBWGnzU726HMaYEU%tx z8D@EhC17#;RTKpuu*j?DU&ioz4HadttWB(c3j}lf>i2XJRG__u`_<;6+EuuJ#)Vm4 zJx}vCcbvPS*u_{G6N%bz{Da{SEDp3(wdXAI>Up1+7s(daOJICj+kYJtx<^m3O+`Ilq26<9^|!VC-$90k zNXe_`hsKwZwu$3ymH!YtG=56nc+Q9?u9e?fABU`(o47QdM=ECdF^*p~Ka{-c*KWv| z+gHymjbBXK^4qWU$me8C_N(7xT~dCJ1jeV5Q*as@H@B~zSJ}hz%1)&~$*DTMJ&JJ3 ze}mlqUY4&Q<)-2=UDM?m+&;4#R3)$Szal7g3exX=s%^zX@W~cg`+{O*qNOVOuI3)I m2#{if_EB)6(C=yVo3iS^%6~M!bG5&Re>k2)2AYbs{r?3F9;^fa diff --git a/Source/header/solve.h b/Source/header/solve.h index e69de29..3dc0f7a 100644 --- a/Source/header/solve.h +++ b/Source/header/solve.h @@ -0,0 +1,153 @@ + +using namespace std; + +class PuzzlePiece: public Part +{ +public: + + PuzzlePiece(unsigned int flag = 0) + { + shifts=0; + boxidentifier=-1; + switch(flag) + { + case 0: + setConnections(0b00000000); + break; + case 1: + setConnections(0b11111111); + break; + case 3: + randomCenterPiece(); + break; + } + } + + void shift(unsigned int moves); + void randomCenterPiece(); + void printPiece() { cout << bitset (getConnections()); } + + void setBoxIdentifier(int new_boxid) { boxidentifier = new_boxid; } + int getBoxIdentifier() { return boxidentifier; } + void assignIdentifier() { identifier = idcount;idcount++; } + unsigned int getIdentifier() { return identifier;} + +private: + unsigned int shifts; + unsigned int boxidentifier; + unsigned int identifier; + static unsigned int idcount; +}; + +unsigned int PuzzlePiece::idcount(0); + +class Puzzle +{ + friend class randomBox; +public: + //constructor creates matrix with 00 outside and 11 inside + Puzzle(uint m = 7, uint n = 4): col(m), row(n) + { + Matrix = new PuzzlePiece* [n+2]; + for(int i = 0;i& myBox, unsigned int separator); + unsigned int putBackIntoBox(unsigned int m, unsigned int n, vector& myBox); + + +private: + uint row; + uint col; + + PuzzlePiece** Matrix; + +}; + +//use this for random puzzle creation +class randomBox: public Puzzle +{ +public: + + randomBox(unsigned int m, unsigned int n) : Puzzle(m,n) {srand(time(0));} //passed m n to puzzle constructor + + void createRandomPuzzle(); + vector shuffle(); + void printBox(); + +private: + vector Box; + +}; + +class coor +{ +public: + int m, n; + coor():m(-1),n(-1){} + coor(int newm,int newn): m(newm), n(newn) + {} +}; + +class LogEntry +{ +public: + vector PieceCollector; + vector CoorCollector; + int abstractionLevel; + + coor myCoor; + PuzzlePiece* myPuzzlePiece; + + LogEntry() + { + abstractionLevel=0; + } +private: +}; + +void printBox(vector myBox); +vector createBox(uint m, uint n); +void numerateBox(vector& myBox); \ No newline at end of file diff --git a/Source/main.cpp b/Source/main.cpp index 878e264..59f9f66 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -1,13 +1,4 @@ -#include -#include -#include -#include -#include -#include - -#include "header/input.h" - -using namespace std; +#include "header.h" int main() { @@ -16,4 +7,9 @@ int main() myFirstPart.setConnections(0b00101000); myFirstPuzzle.push_back(myFirstPart); cout << "Hello World" << endl; + randomBox myFirstBox(2,3); + myFirstBox.createRandomPuzzle(); + myFirstBox.shuffle(); + myFirstBox.printPuzzle(); + }