Giter Site home page Giter Site logo

adler3d / jquery-sokoban Goto Github PK

View Code? Open in Web Editor NEW

This project forked from borgar/jquery-sokoban

0.0 0.0 0.0 14 KB

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

Home Page: http://borgar.net/programs/sokoban/

JavaScript 100.00%

jquery-sokoban's Introduction

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).

jquery-sokoban's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.