Example #1
0
        public static GameBoard CreateGame(Guid guid, int complexityLevel)
        {
            int width, height, colorCount;

            switch (complexityLevel)
            {
            case 2:
                width      = 20;
                height     = 20;
                colorCount = 12;
                break;

            case 1:
                width      = 15;
                height     = 15;
                colorCount = 9;
                break;

            case 0:
            default:
                width      = 10;
                height     = 10;
                colorCount = 6;
                break;
            }

            var boardData = RandomFieldGenerator.Create(width, height, colorCount);

            return(new GameBoard(width, height, boardData, guid, ColorPaletteGenerator.CreateHexPalette(colorCount)));
        }