lib/games/tictactoe.rb in games_bfox-0.3.0 vs lib/games/tictactoe.rb in games_bfox-0.4.0
- old
+ new
@@ -2,12 +2,19 @@
Dir[File.join(File.expand_path(File.dirname(__FILE__)), 'tictactoe', '*.rb')].each {|file| require file }
class TicTacToe
def self.run
io = Shared::IOTerminal.new
+ io_helpers = TTT::IOHelpers.new(io)
board_presenter = TTT::BoardPresenterTerminal.new
+ board_builder = TTT::BoardBuilder.new
+ players_factory = TTT::PlayersFactory.new(io_helpers)
- game = TTT::Game.new(game_module: TTT, io: io, board_presenter: board_presenter)
- # game.setup
+ game = TTT::Game.new(
+ io_helpers: io_helpers,
+ board_presenter: board_presenter,
+ board_builder: board_builder,
+ players_factory: players_factory,
+ )
game.play
end
end