Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
css
 
 
js
 
 
 
 
 
 

README.md

Sōkoban

An implementation of Sokōban in JavaScript, as a jQuery plugin. It parses and runs the de-facto standardized Sokoban puzzle notation, is capable of running multiple games and includes a separate undo buffer for each one. It's about 300 lines of code.

How to use

  1. Include a reference to the plugin (and jQuery) to the <head> section of your document:

     <script src="jquery.min.js"></script>
     <script src="jquery.sokoban.js"></script>
    
  2. Add a Sokoban puzzle to your HTML document:

     <pre class="sokoban>
     ####
     # .#
     #  ###
     #*@  #
     #  $ #
     #  ###
     ####
     </pre>
    
  3. Run the game when the document loads:

     <script>
     jQuery(function($){
       $('pre.sokoban').sokoban();
     });
     </script>
    
  1. Consider adding CSS styles to make the levels look nicer (some are included in the project).

About

Sōkoban implemented as a HTML progressive enhancement jQuery plugin.

Resources

Releases

No releases published
You can’t perform that action at this time.