Go to file
Rebecca Hankey ec7b133190 I added a new method that would check for winning
combinations in the tic tac toe game, then completed the existing
method for checking the winner.

I outlined my strategy a little in the notes section as well, but like a lof of my code,
I plan on paper. It remainded me of the same thing I tell my students when they are writing an essay.
Even if it seems obvious, you have to tell the reader (or in theis case the computer) what you
mean. Or it will fill in the gaps based on what you already said, and that is how things get
misconstrude. I started by writing the ways that the game can end.

1. The board can be full and there is no winner.
2. X can will by getting three in a row; row, column, and diagonal.
3. 0 can win by getting three in a row; row, column, and diagonal.

The I elimated the options that are alread accounted for. We have a solution for when the
board is completely full, so there needs to be options to end the game when a winner actually
wins.

So, I listed the ways that you can win, the integer combos that are options for a win. I listed them
in order by the direction of the win. Row then column, then diagonal. Finally, I listed the steps that
I would need to add this to the code.

1. I needed to adjust the def_winner method to return something other than just false.
2. To make it able to tell True from False, I needed to tell it what was true; so I also would
have to list the combos that would win.
3. I need a new method that will check the board against the index provided in the def_winner method.
2024-11-23 14:09:33 -05:00
nim Initial commit 2024-08-29 12:32:50 +00:00
strategy Initial commit 2024-08-29 12:32:50 +00:00
ttt I added a new method that would check for winning 2024-11-23 14:09:33 -05:00
.commit_template Initial commit 2024-08-29 12:32:50 +00:00
.gitignore Initial commit 2024-08-29 12:32:50 +00:00
notes.md I added a new method that would check for winning 2024-11-23 14:09:33 -05:00
play_nim.py Initial commit 2024-08-29 12:32:50 +00:00
play_ttt.py Initial commit 2024-08-29 12:32:50 +00:00
poetry.lock Initial commit 2024-08-29 12:32:50 +00:00
pyproject.toml Initial commit 2024-08-29 12:32:50 +00:00