X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=SpeechSynthesis%2FSpeechSynthesis.groovy;h=1f25d79b5c873edf53c060076b4281ea383c8c5c;hb=33b28ef5e367fbf98724f874c6c7616c20d831d7;hp=acc2d80545cee93895eeb840085192cddb4da16c;hpb=31da25f02c14814f402e84b35a174f3c0958cd38;p=smartthings-infrastructure.git diff --git a/SpeechSynthesis/SpeechSynthesis.groovy b/SpeechSynthesis/SpeechSynthesis.groovy index acc2d80..1f25d79 100644 --- a/SpeechSynthesis/SpeechSynthesis.groovy +++ b/SpeechSynthesis/SpeechSynthesis.groovy @@ -7,13 +7,15 @@ public class SpeechSynthesis { private String label private String displayName private int level + private boolean oneUser - SpeechSynthesis(String id, String label, String displayName, int level) { + SpeechSynthesis(String id, String label, String displayName, int level, boolean oneUser) { this.id = id this.label = label this.displayName = displayName this.level = level + this.oneUser = oneUser } def setLevel(int level) { @@ -25,5 +27,11 @@ public class SpeechSynthesis { def speak(String message) { println("Speech synthesis with id:$id, SPEAKING:\"$message\"!") + // As a conflict variable + if (oneUser) { + this.oneUser = false + } else { + this.oneUser = true + } } }