Skip to content

salonicodes/Snakes-And-Ladders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Snakes-And-Ladders

Solving the Design Problem- Snakes and Ladders

Problem Statement

Create a snake and ladder application. The application should take as input (from the command line or a file):

  • Number of snakes (s) followed by s lines each containing 2 space-separated numbers denoting the head and tail positions of the snake.
  • Number of ladders (l) followed by l lines each containing 2 space-separated numbers denoting the start and end positions of the ladder.
  • Number of players (p) followed by p lines each containing a name.

After taking these inputs, you should 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.

About

Solving the Design Problem- Snakes and Ladders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages