X-Git-Url: https://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/366b1a5719699e7b6daf2c4ebafbebab78cb5128..e9ab90141032c23a97fa82a723a7a751658bce66:/src/motif_ui.c diff --git a/src/motif_ui.c b/src/motif_ui.c index 40f4632..279f550 100644 --- a/src/motif_ui.c +++ b/src/motif_ui.c @@ -239,6 +239,11 @@ static void game_input(Widget w, void *data, void *cb_data) return; if (game_do_move(&state->board, x, y) == 0) { + if (game_check_goal(&state->board)) { + printf("You win!\n"); + game_finish(&state->board); + } + x11_redraw_game(state); } }