Skip to content

Instantly share code, notes, and snippets.

@NicoleCarpenter
Last active June 2, 2016 15:59
Show Gist options
  • Save NicoleCarpenter/331d2cddc7214a1ee48100f7cc775123 to your computer and use it in GitHub Desktop.
Save NicoleCarpenter/331d2cddc7214a1ee48100f7cc775123 to your computer and use it in GitHub Desktop.
TTT Feedback from Taka, Kofi and Lisa

File structure

  • should be more detailed (T | K)
  • mock files should exist on test side rather than lib side (T)

Naming

  • all validators (input, ttt_move, selection) are input validators, consider renaming input validator (T)
  • __is_winner() and __is_tie() methods do not return Booleans (T)

Logic

  • should work with lower max depth (T)
  • winner variable can either be Boolean or Player type (T)
  • game_over and winner variables should be set by function rather than default to False (T)
  • constructor for board base class does not need board size since it is over-written (K)
  • ttt board is managing state, formatting and winning conditions (K)
  • ttt-board abstraction not being used where I am calling board.active board outside of the ttt board class (K)
  • computer player and human player are exactly the same, player abstractions are not necessary because I have move generator (K)
  • io function __sleep has default but it is never needed because I am always passing a value (K)
  • display computer thinking is weird in computer move generator, use pub-sub pattern to eliminate view dependency (K)

Tests

  • separate longer running tests as integration tests (T)
  • tests for constructors existing are not necessary (K)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment