Example #1
0
        public Game_Generic(int x_size, int y_size)
        {
            gameBoard      = new int[x_size, y_size];
            gamePieces     = new List <Piece_Generic>();
            currentPlayers = new List <Player>();
            loop           = new Server_GameLoop();
            gameType       = "generic";
            maxPlayers     = 2;

            // Player 1 - temp -

            Piece_Generic piece = new Piece_Generic();

            piece.setX(2);
            piece.setY(2);
            piece.setValue(0)


            // Player 2 - temp -

            Piece_Generic piece2 = new Piece_Generic();

            piece2.setX(3);
            piece2.setY(3);
            piece2.setValue(1)

            // Add to board
            gamePieces.Add(piece1);
            gamePieces.Add(piece2);
        }
        public Game_ConnectFour()
        {
            gameBoard      = new int[cols, rows];        // set the rows and columns into the gameboard we made earlier.
            gameType       = "connectFour";              // Server will know that we made a connectFour game
            gamePieces     = new List <Piece_Generic>(); // May not need this for our implementation
            currentPlayers = new List <Player>();        // list of players
            loop           = new Server_GameLoop();      // Make a new server_gameloop (unecessary?)
            maxPlayers     = 2;                          // 2 players max

            Console.Write("connectFour has been initialized");
        }