Class: Xudoku::Choice
- Inherits:
-
Array
- Object
- Array
- Xudoku::Choice
- Defined in:
- lib/xudoku/choice.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
- #board ⇒ Object
- #current_guess ⇒ Object
- #current_index ⇒ Object
- #exhausted? ⇒ Boolean
- #guesses ⇒ Object
- #step ⇒ Object
Class Method Details
.from(arr) ⇒ Object
6 7 8 |
# File 'lib/xudoku/choice.rb', line 6 def self.from(arr) new(arr) end |
Instance Method Details
#board ⇒ Object
18 19 20 |
# File 'lib/xudoku/choice.rb', line 18 def board self[2] end |
#current_guess ⇒ Object
26 27 28 |
# File 'lib/xudoku/choice.rb', line 26 def current_guess guesses[current_index] end |
#current_index ⇒ Object
14 15 16 |
# File 'lib/xudoku/choice.rb', line 14 def current_index self[1] end |
#exhausted? ⇒ Boolean
22 23 24 |
# File 'lib/xudoku/choice.rb', line 22 def exhausted? current_index >= guesses.size end |
#guesses ⇒ Object
10 11 12 |
# File 'lib/xudoku/choice.rb', line 10 def guesses self[0] end |
#step ⇒ Object
30 31 32 33 |
# File 'lib/xudoku/choice.rb', line 30 def step self[1] += 1 self end |