Package nl.nuggit.randomstranger.language

Examples of nl.nuggit.randomstranger.language.Utterance


        start();
        System.out.println(name + " has started");
    }

    public void receive(String name, String input) {
        memory.currentDiscussion().addUtterance(new Utterance(name, input));
    }
View Full Code Here


        memory.currentDiscussion().addUtterance(new Utterance(name, input));
    }

    public void send(String message) {
        out.println(String.format("%s : %s", name, message));
        memory.currentDiscussion().addUtterance(new Utterance(name, message));
    }
View Full Code Here

        }
    }

    private String determineResponse(Discussion discussion) {
        String response = null;
        Utterance lastUtterance = discussion.getLastUtterance();
        if (discussion.getSilenceSeconds() > (lastUtterance.complexity() / 2)) {
            if (lastUtterance.getMessage().contains("?")) {
                response = "I have no idea...";
            }
            else if (lastUtterance.complexity() < 3) {
                response = "sup?";
            }
            else if (lastUtterance.complexity() < 10) {
                response = "you could say that";
            }
            else {
                response = "hmmm.... interesting";
            }
View Full Code Here

TOP

Related Classes of nl.nuggit.randomstranger.language.Utterance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.