Last Friday I delivered the result of my first week’s work at 8th Light. I received positive feedback from my mentor, as well as a healthy dose of constructive criticism.
Well done:
- Delivered assigned story on-time (integrated minimax as decision maker for unbeatable AI in tic tac toe)
- Tests run quickly and correctly verify that code is working
To improve:
- Strive to make my code more functional (work towards less hard-coding and more abstraction)
- Minimize use of local variables -- they are a code smell
Stories for this week:
- Build out a class that allows for the game to be configured to:
a) select marker types (any character A-Z or a-z)
b) choose board size (3x3 or 4x4)
c) choose opponent type (human or computer)
- Allow tic tac toe to be played on a 4x4 board
a) integrate alpha-beta pruning so that a 4x4 game does not take an inordinate amount of time
b) algorithmically describe how to generate the winning combinations on the board (rows, columns, and diagonals)
- Fix input when selecting a square so that if more than one character is entered an error is thrown
Refactoring:
- Work to make IO class easier to do dependency injection so that it looks more like this