From 83df11530c3d079965a2d1f8d916d1ed14a9c9d1 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Fri, 22 Oct 2021 00:37:38 +0200 Subject: [PATCH] Validate with enter (not space) --- src/view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view.c b/src/view.c index b2dd8f7..b43319a 100644 --- a/src/view.c +++ b/src/view.c @@ -66,7 +66,7 @@ void draw_ttt(WINDOW * w, s_tictactoe * u){ } } -void set_next_player_move(s_move * m,p_view v) +void set_next_player_move(s_move * m, p_view v) { char * s="Player to play:%c"; int in_x = 3, out_x = 3; @@ -162,7 +162,7 @@ void set_next_player_move(s_move * m,p_view v) if ( out_y < 6 ) { out_y+=2; } } break; - case ' ': + case '\n': if ( v->p_uttt->inception_level == 1 ) { m->outer_position = coord_to_elocation( out_y, out_x); return;