Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
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;
 }
Exemplo n.º 4
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;
 }
Exemplo n.º 5
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;
 }