]> git.cworth.org Git - loudgame/commitdiff
Mark emptyslots explicitly in the show output
authorCarl Worth <cworth@cworth.org>
Fri, 18 Jan 2008 08:20:49 +0000 (00:20 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 18 Jan 2008 08:20:49 +0000 (00:20 -0800)
lg-set.c

index c5ebbfb67b7f199d0347cb2ae3846fbeabea4b0c..94bebc3f0bc5e325e949d156d686e0b8c3769847 100644 (file)
--- a/lg-set.c
+++ b/lg-set.c
@@ -255,12 +255,18 @@ set_game_handle_show (set_game_t  *game,
     int i, j;
 
     s = board_str;
     int i, j;
 
     s = board_str;
-    for (i = 0; i < board->num_slots; i++)
+    for (i = 0; i < board->num_slots; i++) {
        if (board->slots[i].has_card) {
            for (j = 0; j < NUM_ATTRIBUTES; j++)
                *s++ = '0' + board->slots[i].card.attributes[j];
            *s++ = ' ';
        if (board->slots[i].has_card) {
            for (j = 0; j < NUM_ATTRIBUTES; j++)
                *s++ = '0' + board->slots[i].card.attributes[j];
            *s++ = ' ';
+       } else {
+           *s++ = '-';
+           *s++ = '-';
+           *s++ = '-';
+           *s++ = ' ';
        }
        }
+    }
     *s = '\0';
 
     loudgame_send (&game->lg, peer, board_str);
     *s = '\0';
 
     loudgame_send (&game->lg, peer, board_str);