protected override void OnMouseUp(MouseEventArgs e)
        {
            var geometry = new SquareGridGeometry(BoardSize, BoardSize, this.Width, this.Height, 5);
            var cell     = geometry.GetCellCoordinates(e.X, e.Y);

            if (cell.HasValue)
            {
                this.OnAction?.Invoke(new GameAction(cell.Value));
            }
        }
Example #2
0
        protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
        {
            var geometry = new SquareGridGeometry(BoardSize, BoardSize, this.Width, this.Height, 5);
            var cell     = geometry.GetCellCoordinates(e.X, e.Y);

            if (cell.HasValue)
            {
                //this.RaiseFieldSelect(cell.Value.ToGameAction());
            }
        }