home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Samples / AFC / Puzzle15 / Src / Pz15Consts.Java < prev    next >
Encoding:
Java Source  |  1998-03-05  |  3.4 KB  |  84 lines

  1. //
  2. // (c) 1998 Microsoft Corporation.  All rights reserved.
  3. //
  4. public interface Pz15Consts
  5. {
  6.     public static final String IMG_NAMES[] = { 
  7.         "piece_01.gif",    "piece_02.gif",    "piece_03.gif",    "piece_04.gif",
  8.         "piece_05.gif",    "piece_06.gif",    "piece_07.gif",    "piece_08.gif",
  9.         "piece_09.gif",    "piece_10.gif",    "piece_11.gif",    "piece_12.gif",
  10.         "piece_13.gif",    "piece_14.gif",    "piece_15.gif",
  11.         "bkgrnd01.gif",    "bkgrnd02.gif",    "bkgrnd03.gif",    "bkgrnd04.gif",
  12.         "bkgrnd05.gif",    "bkgrnd06.gif",    "bkgrnd07.gif",    "bkgrnd08.gif",
  13.         "bkgrnd09.gif",    "bkgrnd10.gif",    "bkgrnd11.gif",    "bkgrnd12.gif",
  14.         "bkgrnd13.gif",    "bkgrnd14.gif",    "bkgrnd15.gif", "bkgrnd16.gif",
  15.         "congrats.gif"};
  16.  
  17.     public static final int PIECES = 0;
  18.     public static final int BKGRND = 15;
  19.     public static final int CONGRATS = 31;
  20.     public static final int NUM_IMAGES = 32;
  21.     public static final int NUM_IMAGES_HOT = 15;
  22.     public static final int NUM_BUTTONS = 15;
  23.  
  24.     public static final int PDIM = 4;
  25.     public static final int SIZE = PDIM * PDIM;
  26.     public static final int MAX_DEPTH = 200;
  27.     public static final int MAX_MOVES = 3*MAX_DEPTH + 1;
  28.  
  29.     public static final int MIN_SCRAMBLE = 10;
  30.     public static final int MAX_SCRAMBLE = 200;
  31.  
  32.     public static final int NO_MOVE =  0;
  33.     public static final int O_UP    = -4;
  34.     public static final int O_LEFT    = -1;
  35.     public static final int O_RIGHT    =  1;
  36.     public static final int O_DOWN    =  4;
  37.     public static final int MOVES[] = { O_UP, O_LEFT, O_RIGHT, O_DOWN };
  38.  
  39.     public static final int M_BUTTON = 551;
  40.     public static final int M_BLANK  = 552;
  41.     public static final int M_SELECT = 553;
  42.  
  43.     public static final int S_RESET = 0;
  44.     public static final int S_NORESET = 1;
  45.     public static final int S_NOHOPE = 2;
  46.     public static final int S_OPTFND = 3;
  47.  
  48.     public static final int ID_SOLUTION = 0;
  49.     public static final int ID_UNDO = 1;
  50.     public static final int ID_RESTART = 2;
  51.  
  52.     public final static String MRQ_CONGRATS = 
  53.         "Congratulations! You have found an optimal solution. Press F2 for a new puzzle.";
  54.     public final static String MRQ_OK =
  55.         "You didn't find an optimal solution. Press F4 to restart this puzzle," +
  56.         " or F2 for a new puzzle.";
  57.     public final static String MRQ_OK_NOOPT =
  58.         "Congratulations! You solved the puzzle. Press F4 to restart this puzzle," +
  59.         " or F2 for a new puzzle.";
  60.     public final static String MRQ_START =
  61.         "Press F2 to scramble the puzzle. You can then unscramble it, or let the " +
  62.         "computer unscramble it for you.";
  63.     public final static String MRQ_SEARCHING = 
  64.         "Searching for optimal solution, so far I have expanded ";
  65.     public final static String MRQ_NOTSEARCHING = 
  66.         "Searching for optimal solution... NOT!";
  67.     public final static String MRQ_OPTIMALFND = 
  68.         "I have found an optimal solution, you can display it by pressing F3.";
  69.     public final static String MRQ_NOHOPE = 
  70.         "You have no hope of finding the optimal solution, you can restart at " +
  71.         "the beginning by pressing F4.";
  72.  
  73.     public final static String CONGRATS_STR1 = 
  74.                          "Congratulations! You solved the puzzle.\n\n";
  75.     public final static String CONGRATS_STR2 = 
  76.                          "Press F2 to start a new game or F4 to restart\n" +
  77.                          "the puzzle you just solved.";
  78.     public final static String CONGRATS_OPT = 
  79.                          "Press F2 to start a new game, F4 to restart\n" +
  80.                          "the puzzle you just solved, or F3 to display\n" +
  81.                          "the optimal solution found by your computer.";
  82. }
  83.  
  84.