/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }