Example #1
0
        public static void Main()
        {
            Console.WriteLine("Hello!\nLet's play 4 in a row!");
            int         numOfPlayers = GameMenager.ChooseNumOf("Players", 1, 2);
            int         numOfRows    = GameMenager.ChooseNumOf("Rows", 4, 8);
            int         numOfColumns = GameMenager.ChooseNumOf("Columns", 4, 8);
            GameMenager NewGame      = GameMenager.StartNewGame(numOfRows, numOfColumns, numOfPlayers);

            NewGame.PlayGame();
            Console.ReadLine();
        }
Example #2
0
        // Start a new game
        public static GameMenager StartNewGame(int i_Rows, int i_Columns, int i_NumOfPlayers)
        {
            Board       GameBoard = new Board(i_Rows, i_Columns);
            GameMenager GameManager;

            if (i_NumOfPlayers == 1)
            {
                GameManager = new GameMenager(GameBoard, "Player 1");
                GameManager.m_SecondPlayer.IsPC = true;
            }
            else
            {
                GameManager = new GameMenager(GameBoard, "Player 1", "Player 2");
            }

            return(GameManager);
        }