// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   RulesScreen.java

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class RulesScreen extends Dialog
    implements ActionListener
{

    public RulesScreen(Frame frame)
    {
        super(frame, true);
        me = new Panel();
        done = new Button("Done");
        addNotify();
        setResizable(false);
        setBounds(new Rectangle(frame.getLocationOnScreen(), frame.getSize()));
        setBackground(new Color(160, 160, 100));
        textRules = new TextArea(new String(""), 1, 1, 1);
        textRules.setBackground(new Color(160, 160, 100));
        textRules.setFont(new Font("Serif", 0, 14));
        for(int i = 0; i < headings.length; i++)
        {
            textRules.setForeground(new Color(0, 0, 0));
            textRules.append(headings[i]);
            textRules.append(stuffs[i]);
        }

        textRules.setEditable(false);
        GridBagLayout gridbaglayout = new GridBagLayout();
        GridBagConstraints gridbagconstraints = new GridBagConstraints();
        me.setLayout(gridbaglayout);
        me.setBackground(new Color(160, 160, 100));
        gridbagconstraints.fill = 1;
        gridbagconstraints.weightx = 1.0D;
        gridbagconstraints.weighty = 1.0D;
        gridbaglayout.setConstraints(textRules, gridbagconstraints);
        me.add(textRules);
        gridbagconstraints.fill = 3;
        gridbagconstraints.anchor = 13;
        gridbagconstraints.weightx = 0.0D;
        gridbagconstraints.weighty = 0.0D;
        gridbagconstraints.gridy = 1;
        gridbaglayout.setConstraints(done, gridbagconstraints);
        me.add(done);
        done.setBackground(new Color(160, 160, 160));
        done.setForeground(Color.black);
        done.addActionListener(this);
        add(me);
        setVisible(true);
    }

    public void actionPerformed(ActionEvent actionevent)
    {
        dispose();
    }

    TextArea textRules;
    Panel me;
    Button done;
    private static final String headings[] = {
        "BASIC PLAY\n", "SETUP\n", "GAME PLAY\n", "ENDING THE GAME\n", "SCORING\n", "UNPLAYED LETTERS\n", "HOW TO WIN\n"
    };
    private static final String stuffs[] = {
        "In Scrabble, players form interlocking words crossword fashion on the board using letter tiles of different values. Each player competes for high score by taking advantage of the letter values, as well as the premium squares on the board.  In a 2-player game, a good player scores in the 300-400 point range.\n \n \n", "The game begins with 100 tiles, shown near the bottom right of your playing area.  The number of tiles your opponents currently have are visible in their racks, directly below their scores.  To begin a game, choose 'Game' from the menu, and then 'New'.  Then enter player names and alarm times if you set the timer option.  (This must be done in the Options menu.)\n \nWhen it's your turn to play, give the other players a chance to turn their heads so they can't see what letters you get, and then click on 'Okay' to begin your turn.\n \nScramble will choose either the first player to type thier name in (so you can decide who goes first), or make a random decision, depending on the settings you choose in the Options menu.\n \nYou can also set the values of the tiles you will be using under Options, as well as the values of squares on the playing field.  If you do not select your prefered setup under the Options menu, Scramble will default to normal Scrabble values.\n \nThe tiles that Scramble gives each player are choosen randomly from the tile set choosen by the option menu (once again the default is normal Scrabble values.)\n \n \n", "The first player combines two or more of his or her letters to form a word, and places it on the board to read either across or down with one letter on the center 'Star' square. Diagonal words are not permitted.\n \nA player completes a turn by clicking on the 'Done' button in the lower left corner of the playing field.  The new letters are drawn for you automatically by Scramble.\n \nPlay passes to the next player. The second player, and then each in turn, adds one or more letters to those already played to form new words. All letters played in a turn must be placed in one row across or down the board, to form one complete word. If, at the same time, they touch others letters in adjacent rows, they must form complete words, crossword fashion, with all such letters. The player gets full credit for all words formed or modified on his or her turn.\n\n\nNew words may be formed by:\n\n   Adding one or more letters to a word or letters already on the board.\n\n   Placing a word at right angles to a word already on the board. The new word must use one of the letters already on the board or must add a letter to it.\n\n   Placing a complete word parallel to a word already played so that adjacent letters also form complete words.\n\n\nNo letter may be shifted after it has been played.\n\nThe blank tiles may be used as any letters. When playing a blank, the player must state which letter it represents to the other human players.   It remains that letter for the rest of the game.\n \nA player may use a turn to trade all, some, or none of the letters in his or her rack. To do this, click on the 'Trade Letters' button in the lower right of the playing field.  Click on the letters you want to trade, one at a time.  Click 'Done' when finished.  Scramble will replace the letters for you from the tile bag.\n \nBefore the game begins, the players should agree upon the dictionary they will use for challenges. All words labeled as a part of speech (including those listed of foreign origin, and as archaic, obsolete, colloquial, slang, etc.) are permitted with the exception of the following: words always capitalized, abbreviations, prefixes and suffixes standing alone, words requiring a hyphen or an apostrophe.\n \nA player may be challenged before the next player starts a turn. If the word challenged is unacceptable, Scramble will give the challenged player his or her tiles back, and the player will lose that turn. If the word challenged is acceptable, the challenger will lose his or her next turn. Consult the dictionary for challenges only.\n \n \n", "The game ends when all letters have been drawn and one player uses his or her last letter, or when all possible plays have been made.\n \n \n", "Scramble keeps track of the players' score automatically.  Each person's score will appear next to their name on the right side of the screen.\n \nThe score for each turn is the sum of the letter values in each word formed or modified on that turn, plus the additional points obtained from placing letters on premium squares.\n \nPremium Letter Squares:  A light blue square doubles the score of a letter placed on it; a dark blue square triples the letter score.\n \nPremium Word Squares: The score for an entire word is doubled when one of its letters is placed on a pink square: it is tripled when one of its letters is placed on a red square. Include premiums for double or triple letter values, if any, before doubling or tripling the word score. \n \nIf a word is formed that covers two premium word squares, the score is doubled and then re-doubled (4 times the letter count), or tripled and then re-tripled (9 times the letter count). NOTE: the center 'Star' square is a pink square, which doubles the score for the first word.\n \nLetter and word premiums count only on the turn in which they are played. On later turns, letters already played on premium squares count at face value.\n \nWhen a blank tile is played on a pink or red square, the value of the word is doubled or tripled, even though the blank itself has no score value.\n \nWhen two or more words are formed in the same play, each is scored.   The common letter is counted (with full premium value, if any) for each word.\n \nAny player who plays seven tiles on a turn scores a premium of 50 points after totaling his or her score for the turn.\n \n \n", "When the game ends, each player's score is reduced by the sum of his or her unplayed letters. In addition, if a player used all letters, the sum of the other players' unplayed letters is added to that player's score.\n \n \n ", "The player with the highest final score wins the game.  In case of a tie, the player with the highest score before adding or deducting unplayed letters wins.\n"
    };
    private static final String rules = "BASIC PLAY\n ----------\n In Scrabble, players form interlocking words crossword fashion on the board using letter tiles of different values. Each player competes for high score by taking advantage of the letter values, as well as the premium squares on the board.  In a 2-player game, a good player scores in the 300-400 point range.\n \n \n SETUP\n -----\n The game begins with 100 tiles, shown near the bottom right of your playing area.  The number of tiles your opponents currently have are visible in their racks, directly below their scores.  To begin a game, choose 'Game' from the menu, and then 'New'.  Then enter player names and alarm times if you set the timer option.\n \n When it's your turn to play, give the other players a chance to turn their heads so they can't see what letters you get, and then click on 'Okay' to begin your turn.\n \n Scramble with choose the first player to be either the first player to type their name in, or make a random decision, depending on how you have set the options.  (You can set the options by choosing the 'Game' menu option, followed by 'Options'.)\n \n You can also set the values of the tiles you will be using under options, as well as the values of squares on the playing field.  If you do not select your prefered setup under the options menu, Scramble will default to normal Scrabble values.\n \n The tiles that Scramble gives each player are choosen randomly from the tile set choosen by the option menu (once again the default is normal Scrabble values.)\n \n \nGAME PLAY\n ---------\n The first player combines two or more of his or her letters to form a word, and places it on the board to read either across or down with one letter on the center 'Star' square. Diagonal words are not permitted.\n \n A player completes a turn by clicking on the 'Done' button in the lower left corner of the playing field.  The new letters are drawn for you automatically by Scramble.\n \n Play passes to the next player. The second player, and then each in turn, adds one or more letters to those already played to form new words. All letters played in a turn must be placed in one row across or down the board, to form one complete word. If, at the same time, they touch others letters in adjacent rows, they must form complete words, crossword fashion, with all such letters. The player gets full credit for all words formed or modified on his or her turn.\n \n New words may be formed by:\n Adding one or more letters to a word or letters already on the board.\n Placing a word at right angles to a word already on the board. The new word must use one of the letters already on the board or must add a letter to it.\n Placing a complete word parallel to a word already played so that adjacent letters also form complete words.\n \n No letter may be shifted after it has been played.\n \n The blank tiles may be used as any letters. When playing a blank, the player must state which letter it represents to the other human players.   It remains that letter for the rest of the game.\n \n A player may use a turn to trade all, some, or none of the letters in his or her rack. To do this, click on the 'Trade Letters' button in the lower right of the playing field.  Click on the letters you want to trade, one at a time.  Click 'Done' when finished.  Scramble will replace the letters for you from the tile bag.\n \nBefore the game begins, the players should agree upon the dictionary they will use, in case of a challenge. All words labeled as a part of speech (including those listed of foreign origin, and as archaic, obsolete, colloquial, slang, etc.) are permitted with the exception of the following: words always capitalized, abbreviations, prefixes and suffixes standing alone, words requiring a hyphen or an apostrophe.\n \n A player may be challenged before the next player starts a turn. If the word challenged is unacceptable, the challenged player takes back his or her tiles and loses that turn. If the word challenged is acceptable, the challenger loses his or her next turn. Consult the dictionary for challenges only.\n \n \n ENDING THE GAME\n ---------------\n The game ends when all letters have been drawn and one player uses his or her last letter, or when all possible plays have been made.\n \n \n SCORING\n -------\n Scramble keeps track of the players' score automatically.  Each person's score will appear next to their name on the right side of the screen.\n \n The score for each turn is the sum of the letter values in each word formed or modified on that turn, plus the additional points obtained from placing letters on premium squares.\n \n Premium Letter Squares:  A light blue square doubles the score of a letter placed on it; a dark blue square triples the letter score.\n \n Premium Word Squares: The score for an entire word is doubled when one of its letters is placed on a pink square: it is tripled when one of its letters is placed on a red square. Include premiums for double or triple letter values, if any, before doubling or tripling the word score. \n \nIf a word is formed that covers two premium word squares, the score is doubled and then re-doubled (4 times the letter count), or tripled and then re-tripled (9 times the letter count). NOTE: the center 'Star' square is a pink square, which doubles the score for the first word.\n \n Letter and word premiums count only on the turn in which they are played. On later turns, letters already played on premium squares count at face value.\n \n When a blank tile is played on a pink or red square, the value of the word is doubled or tripled, even though the blank itself has no score value.\n \n When two or more words are formed in the same play, each is scored.   The common letter is counted (with full premium value, if any) for each word.\n \n Any player who plays seven tiles on a turn scores a premium of 50 points after totaling his or her score for the turn.\n \n \n UNPLAYED LETTERS\n ----------------\n When the game ends, each player's score is reduced by the sum of his or her unplayed letters. In addition, if a player used all letters, the sum of the other players' unplayed letters is added to that player's score.\n \n \n HOW TO WIN\n ----------\n The player with the highest final score wins the game.  In case of a tie, the player with the highest score before adding or deducting unplayed letters wins.\n";

}
