Code Monkey home page Code Monkey logo

frog-leap-game's Introduction

FROG LEAP GAME

The objective of the puzzle is to switch the positions of all the colored frogs, so that all three brown frogs are on the right and all three green frogs are on the left. When all the frogs have reached the other side of the pond, you win!

Choose a frog to make it jump forward or backward. A frog can jump a maximum of two spaces, and the destination spot must be free.

Brwon frogs can only hop to the right. Green frogs can only hop to the left. Frogs can only jump onto an empty rock. A frog can jump over one frog to an empty rock—but only over one.

Frogs cannot jump back, only forward. It’s easy to tell which way they can go—they face the way they want to jump.

If you get stuck and your frogs can't jump anywhere, restart the code to reset the game.

Website for game reference:

https://www.neok12.com/games/leap-froggies/leap-froggies.htm

INSTRUCTIONS HOW TO PLAY:

  1. Select the frog using just as like list indexing options ranging 0 to 6 where 0 is the first position and 6 is the last to hop the fog based on some conditions.
  2. The 'B' represents brown frog, 'G' represents green frog and '_' represents vacant stone.
  3. A frog can jump over only one frog(any color) at a time, or just jump to a nearby vacant rock.
  4. Move all the brown frogs to the right and green frogs to the left to solve the game puzzle.

SOLUTION: If You Get Stuck

4 2 1 3 5 6 4 2 0 1 3 5 4 2 3

Press these numbers in series as asked at the input time from user.

frog-leap-game's People

Contributors

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