Пример #1
0
 /**
  * Constructor
  * @param x, the x index
  * @param y, the y index
  * @param switcher, the JewelSwitcher
  * @param manager, the JewelManager
  */
 public Jewel(int x, int y, JewelSwitcher switcher, JewelManager manager)
 {
     this.x        = x;
     this.y        = y;
     this.switcher = switcher;
     this.manager  = manager;
     this.Click   += ButtonClick;
 }
Пример #2
0
 /**
  * Constructor
  * @param win, MainWindow (WPF window object)
  * @param grid, the game grid element
  * @param moveCount, the TextBlock for move count
  * @param scoreCount, the TextBlock for score count
  * @param startMove, the number of moves the player starts with
  */
 public Container(Window win, Grid grid, TextBlock scoreCount, TextBlock moveCount, int startMove)
 {
     switcher       = new JewelSwitcher();
     manager        = new JewelManager(8, 8, switcher, grid, this);
     scoreTracker   = new ScoreTracker(moveCount, scoreCount);
     moveCount.Text = startMove.ToString();
     playerWait     = false;
     this.win       = win;
 }
Пример #3
0
 /**
  * Constructor
  * @param rowNum, the number of rows in the grid
  * @param colNum, the number of columns in the grid
  * @param switcher, jewel switcher object
  * @param grid, WPF element grid for the game
  */
 public JewelManager(int rowNum, int colNum, JewelSwitcher switcher, Grid grid, Container container)
 {
     jewelArr           = new Jewel[rowNum, colNum];
     rand               = new Random();
     this.switcher      = switcher;
     this.grid          = grid;
     this.colNum        = colNum;
     this.rowNum        = rowNum;
     addJewel           = true;
     alteredJewels      = new HashSet <Jewel>();
     this.container     = container;
     jewelDeletionCount = 0;
 }
Пример #4
0
 /**
  * Constructor
  * @param x, the x index
  * @param y, the y index
  * @param switcher, the JewelSwitcher
  * @param manager, the JewelManager
  */
 public PurpleJewel(int x, int y, JewelSwitcher switcher, JewelManager manager) : base(x, y, switcher, manager)
 {
     type = Type.PURPLE;
 }
Пример #5
0
 /**
  * Constructor
  * @param x, the x index
  * @param y, the y index
  * @param switcher, the JewelSwitcher
  * @param manager, the JewelManager
  */
 public RedJewel(int x, int y, JewelSwitcher switcher, JewelManager manager) : base(x, y, switcher, manager)
 {
     type = Type.RED;
 }
Пример #6
0
 /**
  * Constructor
  * @param x, the x index
  * @param y, the y index
  * @param switcher, the JewelSwitcher
  * @param manager, the JewelManager
  */
 public BlueJewel(int x, int y, JewelSwitcher switcher, JewelManager manager) : base(x, y, switcher, manager)
 {
     type = Type.BLUE;
 }