Module: Codebreaker::BLL::Commands
- Defined in:
- lib/codebreaker/bll/comands.rb
Class Method Summary collapse
- .chose_diffucult ⇒ Object
- .enter_name ⇒ Object
- .save_game_statistic(**statistic) ⇒ Object
- .start(**difucult) ⇒ Object
- .stats ⇒ Object
Class Method Details
.chose_diffucult ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/codebreaker/bll/comands.rb', line 26 def chose_diffucult CLI::UI::Prompt.ask('Chose diffucult:') do |handler| BLL::DIFFUCULTS.each do |diffucult_name, diffucult_parameters| handler.option(diffucult_name.to_s) do { diffucult_name: diffucult_name, diffucult_parameters: diffucult_parameters } end end end # BLL::DIFFUCULTS.values.first end |
.enter_name ⇒ Object
21 22 23 24 |
# File 'lib/codebreaker/bll/comands.rb', line 21 def enter_name DAL.enter_name(CLI::UI.ask('What ur name?')) # DAL.enter_name('qwer') end |
.save_game_statistic(**statistic) ⇒ Object
17 18 19 |
# File 'lib/codebreaker/bll/comands.rb', line 17 def save_game_statistic(**statistic) p statistic.to_s end |
.start(**difucult) ⇒ Object
9 10 11 |
# File 'lib/codebreaker/bll/comands.rb', line 9 def start(**difucult) Codebreaker.start(**difucult) end |
.stats ⇒ Object
13 14 15 |
# File 'lib/codebreaker/bll/comands.rb', line 13 def stats # TODO: add DAL end |