]> Pileus Git - ~andy/spades/blobdiff - src/Client.java
Setup game automatically
[~andy/spades] / src / Client.java
index b56decd472f91c29c4b8b305750c9007933153e1..dc7c2dbba04c4106e442191107e03f7de9f1a1f0 100644 (file)
@@ -116,19 +116,24 @@ public class Client
                }
        }
 
-       public Message send(String txt)
+       public Message send(String dst, String txt)
        {
                if (txt == null || txt.length() == 0)
                        return null;
                if (this.validate() != State.READY)
                        return null;
-               Message msg = new Message(this.channel, this.name, txt);
+               Message msg = new Message(dst, this.name, txt);
                if (msg.type == Message.Type.JOIN)
                        this.channel = msg.msg;
                this.raw(msg.line);
                return msg;
        }
 
+       public Message send(String txt)
+       {
+               return this.send(this.channel, txt);
+       }
+
        public Message recv()
        {
                while (true) try {