Example #1
0
        public bool ConditionMet(Enums.Symbol playerSymbol, IGameBoard board)
        {
            var met = true;

            for (var i = 0; i < board.Size; i++)
            {
                if (board.Get(i, i) != playerSymbol)
                {
                    met = false;
                    break;
                }
            }

            if (met)
            {
                return(true);
            }

            met = true;
            var j = 0;

            for (var i = board.Size - 1; i >= 0; i--)
            {
                if (board.Get(j, i) != playerSymbol)
                {
                    met = false;
                    break;
                }
                j++;
            }

            return(met);
        }
Example #2
0
        public BinanceSymbolData FetchPopulateBinanceSymbolData(Enums.Symbol symbol, int limit)
        {
            Console.WriteLine("Currently Fetching Data from Binance...");
            BinanceSymbolData symbolData = GetSymbolData(symbol.ToString(), "30m", limit.ToString());

            indicatorService.PopulateSymbolDataListMetaData(symbolData.Periods);
            return(symbolData);
        }
Example #3
0
        public BinanceSymbolData GetUnderRSISymbol(Enums.Symbol symbol, decimal RSILimit, int numberOfCandles)
        {
            var symbolData = binanceService.FetchPopulateBinanceSymbolData(symbol, numberOfCandles);
            var periods    = symbolData.Periods;

            Console.WriteLine(symbolData.Symbol + "---" + periods[periods.Count - 3].ToString(true));
            return(symbolData);
        }
Example #4
0
        public bool ConditionMet(Enums.Symbol playerSymbol, IGameBoard board)
        {
            for (var x = 0; x < board.Size; x++)
            {
                for (var y = 0; y < board.Size; y++)
                {
                    if (board.Get(x, y) == Enums.Symbol.Empty)
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
Example #5
0
 public bool ConditionMet(Enums.Symbol playerSymbol, IGameBoard board)
 {
     for (var column = 0; column < board.Size; column++)
     {
         var met = true;
         for (var row = 0; row < board.Size; row++)
         {
             met = met && board.Get(column, row) == playerSymbol;
         }
         if (met)
         {
             return(true);
         }
     }
     return(false);
 }
Example #6
0
 public Player(string name, Enums.Symbol symbol)
 {
     Name   = name;
     Symbol = symbol;
 }
Example #7
0
 public void SetCell(CellCord cellCord, Enums.Symbol cellState)
 {
     _grid[cellCord.X, cellCord.Y].CellState = cellState;
 }
Example #8
0
 public void SetCell(CellCord cellCord, Enums.Symbol cellState)
 {
     gameBoardDispaly1.SetCell(cellCord, cellState);
 }
Example #9
0
 public GameBoard(int size)
 {
     Size  = size;
     Cells = new Enums.Symbol[size, size];
 }
Example #10
0
 public void Set(Enums.Symbol t, int x, int y)
 {
     Cells[x, y] = t;
 }