diff --git a/assessment.md b/assessment.md new file mode 100644 index 0000000..c64b8c1 --- /dev/null +++ b/assessment.md @@ -0,0 +1,26 @@ +# Tic Tac Toe Lab Assessment + +Everything's done--nice work! + +## Checkpoint 1 +Looks good. + +## Checkpoint 2 +Works! I don't think there's a much more elegant way to do this, although I +might have chosen to separate out the data (row/col/diagonal indices) from the +looping structure. If you wanted to get fancy, you could do this (prob some constructs +here you haven't seen, but might find interesting). Ask me if you can't figure out +what's going on :) + +``` +combos = [ + [0, 3, 6], + [1, 4, 7], + ... +] +is_symbol = lambda index: state['board'][index] == symbol +return any(all(map(is_symbol, combo)) for combo in combos) +``` + +## Checkpoint 3 +Looks good.