This is a Java implementation of the classic Snake and Ladder game. The game is designed to support multiple players and includes features such as snakes, ladders, and dice rolling.
Supports multiple players Configurable number of snakes and ladders Handles collisions between players Logs game events such as dice rolls, player movements, and encounters with snakes/ladders
Run the main class PlaySnakeAndLadder
The game expects input in the following format:
Total number of snakes (S) S lines containing the head and tail positions of each snake Total number of ladders (L) L lines containing the bottom and top positions of each ladder Total number of players (N) N lines containing the name and starting position of each player
9 62 5 33 6 49 9 88 16 41 20 56 53 98 64 93 73 95 75 8 2 37 27 46 10 32 51 68 61 79 65 84 71 91 81 100 3 Gaurav 1 Sagar 1 Rohan 1
The game logs each player's actions, including dice rolls, movements, and encounters with snakes/ladders. If a player wins, the game announces the winner.