C:\upload\java\Life\source\java\Strings.java
/* ******************************************************************
    This interface contains no code, only string constants used 
    by the code. This class contains all strings used. For 
    simplicity and internationalization.

    Hence when this interface is implemented, there is no code to
    over-write, and all constants come for free.
********************************************************************* */

public interface Strings
{
    // String constants follow.

    // Window names:

    final String QUESTION            = "Question";
    final String INSTRUCTIONS        = "Instructions";
    final String HOW_GAME_IS_PLAYED  = "How game is played";
    final String ERROR_WINDOW_NAME   = "A program error has occurred";
    final String KEEP_PLAYING_STRING = "Do you wish to keep playing?";
    final String DEBUG_INFO          = "Debug info";

    // Initial questions:

    final String SEE_INSTRUCTIONS_STRING = "Do you wish to see the instructions?";

    // Various errors:

    final String UNRECOVERABLE_ERROR                    = "Unrecoverable error";
    final String INPUT_ERROR_STRING                     = "An input error has occurred.";
    final String BOARD_WIDTH_OR_HEIGHT_IS_GARBAGE       = "We cannot assign values to " +
                              "several parameters, as we do not know the size " +
                              "of the board";

    final String BAD_VALUES_FOR_ROWS_OR_COLUMNS = "In Life, class < Initializations >, " +
                              "attempted to make boards with bad values of rows, " +
                              "columns, or both, error";

    final String DIMENSIONS_OF_BOARD_DO_NOT_MAKE_SENSE  = "Dimensions of boards do not " +
                                                         "make sense";

    final String GARBAGE_VALUES_OF_I_OR_J               = "Garbage values of i and / or j";
    final String GARBAGE_VALUE_OF_PARAMETER            = "A parameter is Garbage: ";

    final String WE_CANNOT_INTERPRET_THIS   = "We cannot interpret this";
    final String ARRAY_BOUNDS_EXCEPTION     = "Array bounds exception";
    final String PERIOD_NOT_PROPERLY_SET    = "period not properly set.";
    final String ERROR_MESSAGE_COLON        = "Error message:";
    final String INPUT_NOT_A_BUTTON         = "Input not a button";

    final String BOARD_TOO_SMALL_TO_SHOW_SAMPLE_BOARDS = 
                 "Board too small to show sample boards?!?!";

    final String BOARD_TOO_SMALL            = "Board too small";
    final String INTERRUPTED_PAUSE          = "Couldn\'t pause, interrupted?!?!";
    final String UNRECOGNIZED_BUTTON        = "unrecognized button";
    final String MALFORMED_INPUT_COLON      = "Malformed input:";
    final String INPUT_OUT_OF_RANGE_COLON   = "Input out of range:";
    final String INSTANTIATION_ERROR        = "Error in instantiations";
    final String INVALID_BUTTON             = "No button was pressed, or it was never set.";

    // Things relating to game's end:

    final String GAME_STOPPED                       = "Game stopped.";
    final String ALL_CELLS_ARE_DEAD                 = "All cells are dead.";
    final String THIS_PATTERN_REPEATS_EVERY         = "This pattern repeats every ";
    final String GENERATIONS                        = "generations.";
    final String PATTERN_REPEATS_EVERY_GENERATION   = 
                    "This pattern repeats every generation without change.";

    final String DO_YOU_WISH_TO_PLAY_GAME           = "Do you wish to play game ";
    final String QUIT_GAME                          = "Quit game?";
    final String QUIT                               = "Quit?";
    final String START_PLAYING                      = "Start playing?";
    final String EVERYONE_DEAD_STRING               = "Everyone dead";
    final String GAME_OVER_STRING                   = "Game over";
    final String YES_WITH_NO_MODIFICATIONS          = "Yes, no modifications";
    final String YES_WITH_MODIFICATIONS             = "Yes, with modifications";
    final String PATTERN_REPEATS                    = "Pattern repeats";

    // Input field names:

    final String PROBABILITY                = "probability";
    final String PIXELS_PER_CELL            = "pixels per cell";
    final String TIME_BETWEEN_GENERATIONS   = "time between generations";
    final String ROWS                       = "rows";
    final String COLUMNS                    = "columns";

    // Text fields used in big UI that asks how game is played:

    final String HOW_DO_WE_GO_FROM_GENERATION_TO_GENERATION = 
                  "Go from one generation to the next via clicking a button or a time delay:";
    final String MILLISECONDS_COMMA_MIN_EQUALS = "milliseconds, min = ";
    final String INPUT_SIZE_OF_BOARD_BY_ROWS_AND_COLUMNS_PLUS_RANGE = 
                  "Input size of board by number of rows and columns. Range: ";
    final String INPUT_SIZE_OF_BOARD_BY_PIXELS_PER_SIDE_PLUS_COMMA = 
                  "by inputting size of cells in pixels per side, ";
    final String NUMBER_OF_ROWS_COLON = "Number of rows:";
    final String NUMBER_OF_COLUMNS = "Number of columns:";
    final String INPUT_GAME_BY_CLICKING_ON_CELLS_OR_PROBALISTICALLY = 
                  "Input game by clicking on which cells are alive, or by probalistic means?";
    final String DASHES = " -- ";
    final String AS_A_PERCENT_WITH_LEFT_PARENS = "(as a percent, (";
    final String DOUBLE_RIGHT_PARENS = "))";

    // "How game is input" strings:

    final String BY_MOUSE_CLICK                     = "by mouse click";
    final String BY_TIME_DELAY                      = "by time delay";
    final String PROBALISTICALLY                    = "probalisticall";
    final String INPUT_ALIVE_OR_DEAD_BY_MOUSE_CLICK = "Input by mouse click";
    final String INPUT_VIA_PROBALISTIC              = "Probalistically:";
    final String BY_ROWS_AND_COLUMNS                = "by rows and columns";
    final String BY_PIXELS                          = "by pixels per side:";
    final String INVALID                            = "(invalid)";// When a field is not used.

    // Stuff about sample boards:

    final String SAMPLE_BOARDS = "Sample boards";
    final String EXAMPLE_BOARDS_TWO_FOLLOW_REPEATING_PATTERNS = 
                                        "Example boards two follow. " +
                                        "Repeating patterns:";

    final String EXAMPLE_BOARDS_ONE_FOLLOW_SYMMETRY  = "Example boards one follows: symmetry";
    final String EXAMPLE_BOARDS_THREE_FOLLOW_WALKERS = 
                            "Example boards three follow. \"Walkers\"";

    // Various words & short phrases:

    final String TO               = "to";
    final String OR               = "or";
    final String GOES_FROM        = "goes from";
    final String POINTER_NULL     = "Pointer null";
    final String VARIABLES_NULL   = "Varables parameter null";
    final String NULL             = "null";
    final String IN               = "in";
    final String HAS              = "has";
    final String LIVING_NEIGHBORS = "living neighbors";
    final String MUST_HAVE_COLON  = "must have:";
    final String AND              = "and";
    final String YES              = "Yes";
    final String NO               = "No";
    final String OK               = "OK";
    final String NULL_STRING      = "";

    // "While playing" strings, buttons:

    final String EDITGAME           = "Edit game?";
    final String QUIT_EDITING       = "Quit editing?";
    final String START_GAME         = "Start game?";
    final String CONTINUE           = "Continue";

    // Next are string arrays relating to how the game is played.
    
    final String [] INSTRUCTIONS_STRINGS = 
    {
        "This is the game of Life.",
        "A given cell that is \"alive\" in the next generation will:",
        "   1) be alive if it has two or three living neighbors,",
        "   2) die of loneliness if it has zero or one living neighbors,",
        "   3) die of overcrowding if it has four or more living neighbors, and",
        "   4) if it is \"dead\" it comes to life if it has exactly three living neighbors.",    
        "A cell with is green will live to the next generation.",
        "A cell which is dark green is alive, but will be dead in the next generation.",
        "A few sample boards follow upon clicking the \"OK\" button.",
        " Click " + "\"" + START_PLAYING + "\"" + " and the game begins."
    };
    final String [] BEFORE_GAME_STARTS_INSTRUCTIONS = 
    {
        "You will be asked several questions. Note that green",
        "buttons are selected; yellow buttons are deselected.",
        "",
        "1) You will also be asked how to go from generation to generation: ",
        "   By clicking a button, or by setting a time delay?",
        "2) You will also be asked how to set board size: by inputing the ",
        "   number of rows and columns (the program sets cell size), or by ",
        "   setting the number of pixels per cell on a side (the program ",
        "   sets rows and columns). ",
        "3) You will be asked how to input the board: by clicking on which ",
        "   cells are alive or dead, or, by a probalistic means in which you ",
        "   input a probability (1 -- 100) and the computer sets the board.",
        "At any time you have the option of clicking the \"Edit game\"",
        "button, and changing the playing board.",
        "Clicking the \"OK\" button sets the game going."
    };
}