Beispiel #1
0
        public void ClearField(CellStadeKey clear)
        {
            for (int x = 0; x <= mainBuffer.GetUpperBound(0); x++)
            {
                for (int y = 0; y <= mainBuffer.GetUpperBound(1); y++)
                {
                    mainBuffer[x, y] = clear;
                }
            }

            OnFieldChanged?.Invoke(this);
        }
Beispiel #2
0
 public void SetCell(CellStadeKey stade, int x, int y)
 {
     mainBuffer[x, y] = stade;
     OnFieldChanged?.Invoke(this);
 }
Beispiel #3
0
 public GameLogic(int wight, int height)
 {
     buffers[0] = mainBuffer = new CellStadeKey[wight, height];
     buffers[1] = new CellStadeKey[wight, height];
 }