diff options
author | jbzdarkid <jbzdarkid@gmail.com> | 2019-11-09 13:39:10 -0800 |
---|---|---|
committer | jbzdarkid <jbzdarkid@gmail.com> | 2019-11-09 13:39:10 -0800 |
commit | 36be1ed32ac9a554f0b11fcc13b5699e717b81f2 (patch) | |
tree | 383618d781bc5b4701b31555f90b8a629fe6d205 /App | |
parent | 413e1f0aaae961660781675158e38520126c11b6 (diff) | |
download | witness-tutorializer-36be1ed32ac9a554f0b11fcc13b5699e717b81f2.tar.gz witness-tutorializer-36be1ed32ac9a554f0b11fcc13b5699e717b81f2.tar.bz2 witness-tutorializer-36be1ed32ac9a554f0b11fcc13b5699e717b81f2.zip |
Functioning solver/validator (at least for mazes)
Diffstat (limited to 'App')
-rw-r--r-- | App/Main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/App/Main.cpp b/App/Main.cpp index d7e3abd..5213a79 100644 --- a/App/Main.cpp +++ b/App/Main.cpp | |||
@@ -21,11 +21,13 @@ | |||
21 | #define SPEED_UP_AUTOSCROLLERS 0x408 | 21 | #define SPEED_UP_AUTOSCROLLERS 0x408 |
22 | 22 | ||
23 | /* ------- Temp ------- */ | 23 | /* ------- Temp ------- */ |
24 | #include "Panel.h" | 24 | #include "Puzzle.h" |
25 | #include "Solver.h" | ||
25 | #include <sstream> | 26 | #include <sstream> |
26 | 27 | ||
27 | #define TMP1 0x501 | 28 | #define TMP1 0x501 |
28 | #define TMP2 0x502 | 29 | #define TMP2 0x502 |
30 | #define TMP3 0x503 | ||
29 | 31 | ||
30 | HWND g_panelId; | 32 | HWND g_panelId; |
31 | Puzzle g_puzzle; | 33 | Puzzle g_puzzle; |
@@ -154,6 +156,9 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | |||
154 | PuzzleSerializer(g_witnessProc).WritePuzzle(g_puzzle, panelId); | 156 | PuzzleSerializer(g_witnessProc).WritePuzzle(g_puzzle, panelId); |
155 | } | 157 | } |
156 | break; | 158 | break; |
159 | case TMP3: | ||
160 | Solver::Solve(g_puzzle); | ||
161 | break; | ||
157 | } | 162 | } |
158 | } | 163 | } |
159 | return DefWindowProc(hwnd, message, wParam, lParam); | 164 | return DefWindowProc(hwnd, message, wParam, lParam); |
@@ -239,6 +244,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance | |||
239 | g_panelId = CreateText(200, 100, 100, L"A3B2"); | 244 | g_panelId = CreateText(200, 100, 100, L"A3B2"); |
240 | CreateButton(200, 130, 100, L"Read", TMP1); | 245 | CreateButton(200, 130, 100, L"Read", TMP1); |
241 | CreateButton(200, 160, 100, L"Write", TMP2); | 246 | CreateButton(200, 160, 100, L"Write", TMP2); |
247 | CreateButton(200, 190, 100, L"Validate", TMP3); | ||
242 | 248 | ||
243 | g_witnessProc->StartHeartbeat(g_hwnd); | 249 | g_witnessProc->StartHeartbeat(g_hwnd); |
244 | 250 | ||