From 0996e05988b5d38faba0f616f06e6dcc7466930e Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 3 Dec 2023 13:33:32 +0200 Subject: [w6] Added solutions for ex1 and ex2 with partials for ex3 and 4 --- week06/ex4.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 week06/ex4.cpp (limited to 'week06/ex4.cpp') diff --git a/week06/ex4.cpp b/week06/ex4.cpp new file mode 100644 index 0000000..b500b33 --- /dev/null +++ b/week06/ex4.cpp @@ -0,0 +1,15 @@ +#include + +int main() { + char chocolate[41][41] = { { '#' } }; + size_t N, M; + std::cin >> N >> M; + + bool firstPlayerTurn = false; + size_t row, col; + unsigned winStatus = 0; + do { + firstPlayerTurn = !firstPlayerTurn; + winStatus = chomp(chocolate, row, col); + } while(winStatus == 0); +} -- cgit v1.2.3