Add assessment

This commit is contained in:
Chris Proctor 2024-03-01 18:34:39 -05:00
parent 9d0c6174ec
commit a4a9c495f8
1 changed files with 26 additions and 0 deletions

26
assessment.md Normal file
View File

@ -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.