]> git.scottworley.com Git - slidingtile/blobdiff - sliding_tile.cc
Don't constrain the hole.
[slidingtile] / sliding_tile.cc
index 4b7e91748b98b5880a254e85199a85990445a236..cfa7425b72964340748900700cbc3199587842a2 100644 (file)
@@ -1,4 +1,12 @@
 #include "sliding_tile_lib.h"
+#include "gflags/gflags.h"
 
-int main() {
+#include <iostream>
+
+DEFINE_string(start, "", "The starting tile positions.  0 is the hole.");
+DEFINE_string(goal, "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0", "The desired tile positions.  0 is the hole.");
+
+int main(int argc, char** argv) {
+  gflags::ParseCommandLineFlags(&argc, &argv, false);
+  std::cout << *find_path(FLAGS_start, FLAGS_goal);
 }