using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models
{
    public class OperationsGrid
    {
        public bool[,] Tiles;

        public OperationsGrid() 
        { 
            Tiles = new bool[5,4];
      
        }

        public void ResultGrid(Operation p)
        {
            switch (p)
            {
                case Operation.LOWER:
                    for (int i = 0; i < Tiles.GetLength(1); i++) { if (Tiles[0, i] == false) { Tiles[0, i] = true; return; } }
                    break;

                case Operation.HIGHER:
                    for (int i = 0; i < Tiles.GetLength(1); i++) { if (Tiles[1, i] == false) { Tiles[1, i] = true; return; } }
                    break;

                case Operation.SUBTRACTION:
                    for (int i = 0; i < Tiles.GetLength(1); i++) { if (Tiles[2, i] == false) { Tiles[2, i] = true; return; } }
                    break;

                case Operation.ADDITION:
                    for (int i = 0; i < Tiles.GetLength(1); i++) { if (Tiles[3, i] == false) { Tiles[3, i] = true; return; } }
                    break;

                case Operation.MULTIPLICATION:
                    for (int i = 0; i < Tiles.GetLength(1); i++) { if (Tiles[4, i] == false) { Tiles[4, i] = true; return; } }
                    break;
                
                default:
                    return;
            }
        }

    }
}
