Sha256: bf9bb9988eee8f1bacd2c57fc631f9d4d1a86e91044fac255da2147a05131e7a

Contents?: true

Size: 746 Bytes

Versions: 1

Compression:

Stored size: 746 Bytes

Contents

Dir[File.join(File.expand_path(File.dirname(__FILE__)), 'shared', '*.rb')].each {|file| require file }
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(
                         io_helpers: io_helpers,
                         board_presenter: board_presenter,
                         board_builder: board_builder,
                         players_factory: players_factory,
    )
    game.play
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
games_bfox-0.4.0 lib/games/tictactoe.rb