]> git.cworth.org Git - loudgame/blobdiff - lg-loa.c
Provide explanation with 'illegal move' error messages
[loudgame] / lg-loa.c
index b18b27d0ff417fb2738792ad4abebcfe028604f7..4bf623076442ea9d8c9d7e7369fb8a3226f3f355 100644 (file)
--- a/lg-loa.c
+++ b/lg-loa.c
@@ -47,9 +47,10 @@ loa_game_move (loa_game_t *game, const char * peer,
     char *error;
 
     if (! loa_board_move (&game->board, x1, y1, x2, y2, &error)) {
-       loudgame_sendf (&game->lg, peer, "Illegal move: %c%d%c%d",
+       loudgame_sendf (&game->lg, peer, "Illegal move: %c%d%c%d: %s",
                        'a' + x1, LOA_BOARD_SIZE - y1,
-                       'a' + x2, LOA_BOARD_SIZE - y2);
+                       'a' + x2, LOA_BOARD_SIZE - y2,
+                       error);
        return FALSE;
     }