Coder Social home page Coder Social logo

puralax-simulator's Introduction

puralax-simulator

A python App that simulates puralax game and shows the best path to win

After playing puralax and left the game with some unresolved levels I decided to make an App to help me. but my main goal was learning python lang with real practice. so you find my code very similar to java and too OOP:-D

how to play

After converting game board to my format you can execute Simulate.py with arguments to see how you can won the game.



for this example your arguments should be:
" blue:1 purple:1 purple:0 red:0 2 2"
you can replace your color name with an unique name for less typing. in abbove exmaple "blue" can be replaced with "b" etc. if a cell was empty you can show that with "0" and when a cell was blocked you can show that with "#" last argument is height of the board and previous arg is width of the board.

  • sample output for this example:
    1-purple[โ†“]
    0-blue[โ†“]

It means purple cell at index 1 should be move down and after that blue cell at index 0 should move down to win the game.

just attention this algorithm order is depend on available moving cells and is:
(n!)*(4^n)
depend on your input board it might take several time to calculate.

puralax-simulator's People

Contributors

felfor avatar

Stargazers

 avatar Daniel Uranga avatar

Watchers

 avatar

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.