/// <summary> /// Constructor for the MazeGame which gets the name and the Maze which /// the MazeGame operates on. /// </summary> /// <param name="name"> /// The name of the maze. /// </param> /// <param name="maze"> /// The maze that the game will be played on. /// </param> public MazeGame(string name, Maze maze) { this.maze = maze; this.maze.Name = name; this.players = new List <Player>(MaxPlayersAllowed); this.hasEnded = false; this.startWhenTrue = (g) => true; }
/// <summary> /// Set the delegate that tells the game to start when some condition is true. /// </summary> /// <param name="func"> /// The delegate that we will save as a member. /// </param> public void SetStartWhenTrue(StartWhenTrue func) { startWhenTrue = func; }