Giter VIP home page Giter VIP logo

snakes-and-ladders's Introduction

Snakes and Ladders Game

Input Format
  • Number of snakes
  • Snakes Head and Tail, one by one
  • Number of Ladders
  • Ladder Start and End, one by one
  • Player Count
  • Name of players, one by one

Example

********* Welcome to Snake and Ladders Game ********* 
Enter the numbers of Snakes: 3
Enter Snakes Head and Tail positions separated by space
Snake 1: 30 4
Snake 2: 80 6
Snake 3: 90 5
Now Enter the numbers of Ladders: 2
Enter Ladder Start and End positions separated by space
Ladder 1: 10 91
Ladder 2: 20 88
Now Enter the numbers of Players: 3
Enter Name for each player
Player 1: Jaya
Player 2: Golu
Player 3: Tanya

Output Format

After this print all the moves in the form of the current player name followed by a random number between 1 to 6 denoting the die roll and the initial and final position based on the move.
Format: player_name rolled a dice_value and moved from initial_position to final_position
When someone wins the game, print that the player won the game.
Format: player_name wins the game

snakes-and-ladders's People

Contributors

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