From 80f8380e6974c91dcb6ec222e4247b4abeeec73d Mon Sep 17 00:00:00 2001 From: Chris Proctor Date: Wed, 6 Mar 2024 12:14:51 -0500 Subject: [PATCH] Add assessment --- assessment.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 assessment.md diff --git a/assessment.md b/assessment.md new file mode 100644 index 0000000..9188c93 --- /dev/null +++ b/assessment.md @@ -0,0 +1,27 @@ +# Tic Tac Toe Lab Assessment + +Everything's done--nice work! + +## Checkpoint 1 +Looks good. + +## Checkpoint 2 +This works! It probably felt a bit tedious. If I were trying to do this +elegantly, I'd probably start by separating the data from the algorithm. +Then, there are a number of python builtin functions and idioms which +I'd reach for: + +``` +combos = [ + [0, 1, 2], + [3, 4, 5], + ... +] +is_symbol = lambda index: state['board'][index] == symbol +return any(all(map(is_symbol, combo)) for combo in combos) +``` + +Happy to explain what's going on here if you have trouble figuring it out :) + +## Checkpoint 3 +Looks good.