static void StartNewSession() { Console.WriteLine("Please enter your name first:"); var playerName = Console.ReadLine(); _humanPlayer = _componentsFactory.CreatePlayer <GamePlayer>(playerName); _computerPlayer = _componentsFactory.CreatePlayer <ComputerGamePlayer>("COMP"); Console.WriteLine("Press ENTER to start new game session."); Console.ReadLine(); _session.Start(_humanPlayer, _computerPlayer); }
static void Main(string[] args) { // Set the stage SetConsoleProperties(); IGameSession gameSession = GameSessionFactory.CreateGameSession(); gameSession.Start(); if (Console.ReadLine() == "y") { Main(null); } else { Environment.Exit(0); } }
public void StartGameSession() { currentGameSession = new GameSession(); currentGameSession.Start(gameState); }