summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2022-11-22 10:22:51 -0800
committerKai Stevenson <kai@kaistevenson.com>2022-11-22 10:22:51 -0800
commit377cb89311fb4ddbb58840e19d02658db41f1ee8 (patch)
tree39e7e557d6a0159e87343f9058f75f00b25ae429
parentbdbf21add98c05289d39904fa9c02ffc4c1dcde9 (diff)
small interface improvements
-rw-r--r--ttt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ttt.c b/ttt.c
index 59181c1..308bf29 100644
--- a/ttt.c
+++ b/ttt.c
@@ -106,9 +106,9 @@ int get_game_state(int boardState[3][3]) {
}
int* user_input_pos(int boardState[3][3], int turn) {
int* ip = malloc(2 * sizeof(int));
- printf("Enter X coordinate");
+ printf("Enter X coordinate: ");
scanf("%d", &ip[0]);
- printf("Enter Y coordinate");
+ printf("Enter Y coordinate: ");
scanf("%d", &ip[1]);
return ip;
}
@@ -185,6 +185,8 @@ int main() {
break;
}
if(s == 3) {
+ clear_screen();
+ draw_board(board);
printf("Game is drawn!");
printf("\n");
break;