A java PacMan game application for A.U.TH (data structures class)
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

70 linhas
2.1 KiB

  1. /**
  2. * @file Globals.java
  3. * @brief
  4. * File containing the Globals class, a helper class for the
  5. * vector based evaluation system
  6. *
  7. * @author Christos Choutouridis 8997 cchoutou@ece.auth.gr
  8. * @author Konstantina Tsechelidou 8445 konstsec@ece.auth.gr
  9. */
  10. package gr.auth.ee.dsproject.node;
  11. /**
  12. * @class Globals
  13. * @brief
  14. * Contains constants and factors to trick
  15. * the Node evaluation algorithm
  16. */
  17. public class Globals {
  18. /*
  19. * Global constants
  20. */
  21. public static final int NO_PLACE = -1; // out of region square
  22. //public static final int NO_MOVE = -1;
  23. public static final int INVALID_MOVE = -1; // invalid move marker
  24. public static final int EVAL_MAX = 100; // out max evaluation value
  25. public static final int EVAL_MIN = -100; // our minimum evaluation value
  26. public static final int NO_EVAL = EVAL_MIN-1; // mark the invalid move or no evaluation
  27. /*
  28. * Evaluation settings
  29. */
  30. /**
  31. * Mixing factor for the minimum distance
  32. */
  33. public static final double EVAL_GHOSTDIST_MIN_FACTOR = 0.8;
  34. public static final double EVAL_LGHOSTDIST_AVER_FACTOR = 1 - EVAL_GHOSTDIST_MIN_FACTOR;
  35. /**
  36. * Evaluation mixing factor representing how much the ghost distances will
  37. * affect the final evaluation value
  38. */
  39. public static final double EVAL_GHOSTDIST_FACTOR = 0.6;
  40. /**
  41. * Evaluation mixing factor representing how much the flag distances will
  42. * affect the final evaluation value
  43. */
  44. public static final double EVAL_FLAGDIST_FACTOR = 1 - EVAL_GHOSTDIST_FACTOR;
  45. /*
  46. * In order to find out when a ghost is inside a cavity we manualy
  47. * define the box limits of the cavity boxes of the current maze here
  48. * :)
  49. */
  50. public static final int BOXES[][][] = {
  51. { { 5, 5}, { 8, 8} },
  52. { { 5, 16}, { 8, 19} },
  53. { {11, 5}, {14, 8} },
  54. { {11, 16}, {14, 19} }
  55. };
  56. public static final int[] FALSE_POS = {-1, -1};
  57. public static final int MAX_DISTANCE = 100;
  58. }