Sha256: cf825965fbe4b5f811fe8b07e251ce4020888fb8a82e22483d0f0d2a7ab4ecba

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

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__)), 'mastermind', '*.rb')].each {|file| require file }

require File.join('games', 'shared', 'io_terminal')
require File.join('games', 'mastermind', 'io_helpers')
require File.join('games', 'mastermind', 'board_presenter_terminal')
require File.join('games', 'mastermind', 'board_builder')
require File.join('games', 'mastermind', 'players_factory')
require File.join('games', 'mastermind', 'game')

class Mastermind
  def self.run
    io = Shared::IOTerminal.new
    io_helpers = MM::IOHelpers.new(io)
    board_presenter = MM::BoardPresenterTerminal.new
    board_builder = MM::BoardBuilder.new
    players_factory = MM::PlayersFactory.new(io_helpers)

    game = MM::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.6.0 lib/games/mastermind.rb