/** This class contains the manual of the game * @author Kristof Friedrichsen * @author Ryan Mann * @author Bob Free * @author Pat O'Neill * @version December 15, 2006 **/ package chutesladder; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextArea; public class Manual extends JFrame{ JPanel panelM; JTextArea textM; public Manual(){ setTitle("Chutes and Ladders Rules"); setSize(540,510); setLocationRelativeTo(null); textM = new JTextArea("Chutes and Ladders Rules: \n \n" + " 1. Everyone spins the spinner. The player with the highest number goes first. \n" + " Play proceeds to the left.\n" + " 2. What to do on your turn: On your turn, spin the spinner and move your pawn, \n" + " square by square, the number shown on the spinner. Once you move your pawn, \n" + " your turn is over.\n" + " 3. Two or more pawns may be on the same space at the same time.\n" + " 4. Going up a ladder or down a chute.\n \n" + "Ladders: Any time a pawn ends its move on a picture square at the bottom of a ladder, \n" + " that pawn must climb up to the picture square at the top of the ladder. \n \n" + "Chutes: Any time a pawn ends its move on a picture square at the top of a chute, \n" + " that pawn must slide down the chute to the picture square at the bottom of the chute.\n \n" + " 5. If your pawn ends its turn on any of the following spaces, your turn is over: \n" + " a. A square with no picture \n" + " b. A square with no picture and just an arrow \n" + " c. A square that a ladder or chute just passes through \n" + " d. A picture square at the top of a ladder \n" + " e. A picture square at the bottom of a chute \n \n" + "Winning the game: \n \n" + "The first player to reach the Blue Ribbon square #100 wins the game. You can get ther 2 ways: \n" + " 1. Land there by exact count. If your spin would take you past square #100, don't move. \n" + " Try again on your next turn. \n" + " 2. Climb there by ending your move on ladder square #80."); panelM = new JPanel(); panelM.add(textM); panelM.setEnabled(false); add(panelM); setVisible(true); } }