private void background_MouseClick(object sender, MouseEventArgs e) { if (isLocking) { return; } Point p = SkinConstants.getColRowIndex(e.X, e.Y); if (p.X == -1) { return; } if (gameShape.matrix[p.X, p.Y] != 0) { piece_Click(pieces[p.X, p.Y], null); } else { if (!isSelected) { return; } moveTo(p.X, p.Y); } }
public Piece(int i, int j) { this.col = i; this.row = j; this.Location = SkinConstants.getLocationOfPiece(i, j); this.Size = new Size( SkinConstants.BallSize.Width, SkinConstants.BallSize.Height); }
private void buildHScore() { for (int i = 0; i < 5; i++) { HScore[i] = new PictureBox(); HScore[i].Location = SkinConstants.getLocationOfHScore(i); HScore[i].Size = SkinConstants.HScoreDigitSize; this.Controls.Add(HScore[i]); } }