]> Pileus Git - ~andy/spades/blobdiff - src/Spades.java
Show turn in title bar
[~andy/spades] / src / Spades.java
index 31878442460291f6564af9b8164b72e94dc39ec0..b1d9d74979b9137ef435787588b8a6f8ab08863b 100644 (file)
@@ -50,6 +50,15 @@ public class Spades
                        this.cards.pile = Spades.getCards(txt, ".*turn! \\((.*)\\)");
                        this.cards.requestRender();
                }
+               if (txt.startsWith("It is")) {
+                       this.cards.turn  = txt.replaceAll("It is (\\w+)'s (\\w+)!.*", "$1");
+                       this.cards.state = txt.replaceAll("It is (\\w+)'s (\\w+)!.*", "$2");
+                       this.cards.requestRender();
+               }
+               if (txt.startsWith("^it is your")) {
+                       this.cards.turn = msg.to;
+                       this.cards.requestRender();
+               }
        }
 
        /* UI Callbacks */