Beispiel #1
0
        public void OnMouseDown(int x, int y, bool isRightMouseDown)
        {
            (int column, int row) = _pixelMapper.PixelsToCoords(x, y);

            if (this.CurrentTool == Tool.Eraser || isRightMouseDown)
            {
                _gameBoard.RemoveTrack(column, row);
            }
            else if (this.CurrentTool == Tool.Track)
            {
                _gameBoard.AddTrack(column, row);
            }
        }
Beispiel #2
0
 public void Execute(int column, int row)
 {
     _gameBoard.AddTrack(column, row);
 }