public static int DecideAmountOfPLayers() // Save user input { int numberOfPlayers = 0; while (numberOfPlayers > 4 || numberOfPlayers < 2) { numberOfPlayers = Convert.ToInt32(Console.ReadLine()); if (numberOfPlayers > 4 || numberOfPlayers < 2) { GameResponses.DisplayAmountError(); } } return(numberOfPlayers); }
static void Main(string[] args) { // Create deck + amount at game start Deck d1 = new Deck(); // Create players (based on input) + provide player hand + print results GameResponses.DisplayWelComeMessage(); int numberofplayers = PlayerFactory.DecideAmountOfPLayers(); PlayerFactory players = new PlayerFactory(numberofplayers); // Join players Board board = new Board(); // Start the game GameInit game = new GameInit(numberofplayers); }
static void End() // Display ending message + instructions { GameResponses.DisplayEndingMessage(); Console.ReadLine(); }