예제 #1
0
        public void TestGetRandomizedLetters()
        {
            var dice = new Dice();

            var letters = dice.GetRandomizedLetters();

            Assert.IsTrue(letters != null && letters.Count > 0 && letters.All(c => c.GetType() == typeof(char)));
        }
예제 #2
0
        public char[,] GenerateGameGrid()
        {
            var lettersOnGrid = new Dice().GetRandomizedLetters();

            var width = 4;
            var height = 4;

            var grid = new char[width, height];

            for (int i = 0; i < width; i++)
            {
                for (int j = 0; j < height; j++)
                {
                    grid[i, j] = lettersOnGrid.Dequeue();
                }
            }

            return grid;
        }