Example #1
0
 public Game(int width, int height, int maxClues)
 {
     this.width    = width;
     this.height   = height;
     this.gameGrid = new GameGrid(width, height);
     this.gameGrid.GenerateGrid();
     this.allClues      = ExtractClues();
     this.selectedClues = SelectClues(max: maxClues);
 }
Example #2
0
        public void PrintSelectedClues()
        {
            GameGrid gameGrid = this.GameGrid;

            this.selectedClues.Sort((a, b) => {
                if (a.Characters.Count < b.Characters.Count)
                {
                    return(-1);
                }
                else if (a.Characters.Count > b.Characters.Count)
                {
                    return(1);
                }
                else
                {
                    return(0);
                }
            });

            this.selectedClues.ForEach(clue => Console.WriteLine(clue));

            Console.WriteLine($"Total Clues: {this.selectedClues.Count}");
        }
Example #3
0
        public void PrintAllClues()
        {
            GameGrid gameGrid = this.GameGrid;

            this.AllClues.ForEach(clue => Console.WriteLine(clue));
        }