lg-set: Add a broadcast whenever a user finds a set.
authorCarl Worth <cworth@cworth.org>
Mon, 18 Feb 2008 22:46:53 +0000 (14:46 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 19 Feb 2008 06:10:12 +0000 (22:10 -0800)
lg-set.c
loudgame.h

index 365e68b7ddafb3db8eaff26922283c2c4f0ead32..a6594b27a3de4bc9ad9a621f68755f97e9a985ec 100644 (file)
--- a/lg-set.c
+++ b/lg-set.c
@@ -430,6 +430,10 @@ set_game_handle_set (set_game_t    *game,
 
     loudgame_sendf (&game->lg, peer,
                    "Yes, that's a set!");
+    loudgame_broadcastf (&game->lg,
+                        "%s found the set: %d %d %d. Please send a new 'show' command.",
+                        peer,
+                        slots[0], slots[1], slots[2]);
 
     for (i = 0; i < 3; i++)
        game->board.slots[slots[i]].has_card = 0;
index 7aedd79db00c1ce71a3bca4fbf27aadc50d76fac..c899727eb0a5220a29145f1613b827695b02a346 100644 (file)
@@ -67,6 +67,20 @@ loudgame_vsendf (loudgame_t  *lg,
                 const char     *format,
                 va_list         va);
 
+void
+loudgame_broadcast (loudgame_t *lg,
+                   const char *message);
+
+void
+loudgame_vbroadcastf (loudgame_t *lg,
+                     const char *format,
+                     va_list     va);
+
+void
+loudgame_broadcastf (loudgame_t        *lg,
+                    const char *format,
+                    ...);
+
 void
 loudgame_quit (loudgame_t *lg, int return_value);