private int requestEngineMove() {
        int move = Game.NULL_MOVE;
        int ponder = Game.NULL_MOVE;
        
        try {
            if (client.isPondering()) {
                client.send("stop");
                
                while (client.isPondering())
                    client.receive();
            }
            
            client.send(getPositionCommand(game));
            client.send(getGoCommand(movetime));
            
            while (client.isThinking())
                client.receive();
            
            move = client.getBestMove();
            ponder = client.getPonderMove();
            
            int length = game.length();
            
            try {
                if (move != Game.NULL_MOVE)
                    performMove(game, move);
                
                if (ponder != Game.NULL_MOVE)
                    performMove(game, ponder);
                
                client.send(getPositionCommand(game));
                client.send("go ponder");
            } catch (Exception e) { }
            
            while (length < game.length())
                game.unmakeMove();
        } catch (Exception e) {
            writer.format("%s%n", e.getMessage());
        }
        
        if (move != Game.NULL_MOVE) {
            writer.format(
                "My move is: %s%n",
                start.toAlgebraic(move)
            );
        }
        
        return move;
    }