Snakes and Ladder Game : Java source code

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

Snakes and Ladder Game : Java source code

This program will simulate a regular snakes and ladders game, where you will be facing the computer. You and the computer start at square 1, and the
http://javahungry.blogspot.com/2013/04/snakes-and-ladder-game.html
  • Total Hits: 15824

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 182 votes

  • Category: JAVA/Core JAVA

  • Submitted on: 2013-12-13 08:51:42

  • Submitted By: Java Hungry

  • Set as Favorite

Description:

Print rules of the game
Makes the board for the player
Prompt user to start the game
If (input==’y’)
Then startGame
Else
Leave command prompt

If startGame

Set starting position for user and computer to 1

User throws the dice then computer throws the dice one after other

Prints the final position after each dice throw for the user as well as computer repeatedly

If user reaches the ladder or snake bitten then reflect the final position after such propositions both
for user and computer

Whoever first reaches the 100 , will win the game , with n predefined attempts

If no one wins with in predefined attempts then prompt user to play the game again or not

Repeat step 1    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 36.26%  66
 Two starsTwo star  Vote LeftVote MiddleVote Right 9.34%  17
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 10.99%  20
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 9.89%  18
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 33.52%  61

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.





Advertisements
Advertisements