From a78f312478e99fe8334a9185437bacec791c1cfc Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 30 Dec 2015 15:41:36 +0100 Subject: [PATCH] Aggiunto comando per saltare un turno. --- main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d28c11c..e3176d7 100644 --- a/main.cpp +++ b/main.cpp @@ -93,7 +93,8 @@ void move(int player[2]) //Rileva i tasti freccia while(waiting) { - if(getch() == 224) + unsigned char input = getch(); + if(input == 224) { switch(getch()) { @@ -135,6 +136,11 @@ void move(int player[2]) break; } } + else if(input == 115) //S + { + //Salta un turno + waiting = false; + } } player[0] = player_x; player[1] = player_y;