private void OnBoardClick(object sender, BoardCellClickEventErgs e) { if (PastShots.ContainsKey(new Point(e.X, e.Y))) { return; } ShotTargetChosen(e.X, e.Y); }
private void OnCellClick(object sender, EventArgs e) { if (Mode != BoardMode.Game) { return; } var handler = OnClick; if (handler == null) { return; } var cell = (BoardCell)sender; var eventArgs = new BoardCellClickEventErgs(cell.X, cell.Y); handler(this, eventArgs); }