public static void runMinesweeperServer(boolean debug, File file, Integer size, int port)
            throws IOException
    {
        Board newBoard;
        
        if (size != null){
        newBoard = new Board(size, 0.25);
        }
        else if (file != null){
        newBoard = new Board(file, debug);
        }
        else{
            throw new RuntimeException("Both file and size are null");
        }
        MinesweeperServer server = new MinesweeperServer(port, debug, newBoard);
        server.serve();
    }