Commits

(no ...@ddf91b2d-1462-4000-aae5-8a08ddc4854f  committed 1789bb4

Added Solve.pl and its timing.

  • Participants
  • Parent commits dc8f7b9

Comments (0)

Files changed (3)

File modules/Shlomif-Sokoban-Solver/MANIFEST

 Build.PL
 Changes
+examples/Solve.pl
+examples/Solve-timing.txt
 lib/Shlomif/Sokoban/Solver/Board.pm
 lib/Shlomif/Sokoban/Solver.pm
 MANIFEST

File modules/Shlomif-Sokoban-Solver/examples/Solve-timing.txt

+Regular:
+--------
+
+115.52user 0.03system 1:56.93elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+858minor)pagefaults 0swaps
+
+With shortened package name:
+----------------------------
+
+112.60user 0.06system 1:54.45elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+858minor)pagefaults 0swaps

File modules/Shlomif-Sokoban-Solver/examples/Solve.pl

+use strict;
+use warnings;
+
+use Shlomif::Sokoban::Solver::Board;
+
+my $board_contents = <<'EOF';
+  ####
+  #  #
+  #  ####
+###$.$  #
+#  .@.  #
+#  $.$###
+####  #
+   #  #
+   ####
+EOF
+
+{
+    my $board = S->load($board_contents);
+
+    $board->solve();
+}