Please sign in to comment.
Turn TicTacToe::Game into a class
I am going to want to refactor this code and add extra functions, but currently it looks like most of that would require passing around board and player objects everywhere. Pulling these attributes up into a constructor method and defining a reader gives us the flexibility to access them across the whole object without having to pass them to the helper functions we're about to create.
- Loading branch information...
|@@ -1,3 +1,4 @@|
|game = TicTacToe::Game.new|