From 76453c39de84248ccc7c02efccb7504d7255e630 Mon Sep 17 00:00:00 2001 From: Aimee Reincke Date: Mon, 30 Jan 2023 10:55:04 +0100 Subject: [PATCH] added initiate Field function --- src/c/ticTacToe.c | 13 ++++++++++++- src/c/ticTacToe.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/c/ticTacToe.c b/src/c/ticTacToe.c index b08dc32..b575e77 100644 --- a/src/c/ticTacToe.c +++ b/src/c/ticTacToe.c @@ -23,4 +23,15 @@ void printField(char field[3][3]){ } printf("\n"); } -} \ No newline at end of file +} + +char initField(){ + char field[3][3] = + { + {'-','-','-'}, + {'-','-','-'}, + {'-','-','-'} + }; + return field; +} + diff --git a/src/c/ticTacToe.h b/src/c/ticTacToe.h index a01e4e4..350fc78 100644 --- a/src/c/ticTacToe.h +++ b/src/c/ticTacToe.h @@ -4,5 +4,6 @@ int something(int a); void printPrompt(); void printField(char field[3][3]); +char initField(); #endif \ No newline at end of file