Class: TenpaiWakaruMan::Detector

Inherits:
Object
  • Object
show all
Defined in:
lib/tenpai_wakaru_man.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDetector

Returns a new instance of Detector.



18
19
# File 'lib/tenpai_wakaru_man.rb', line 18

def initialize
end

Class Method Details

.ready?(str) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/tenpai_wakaru_man.rb', line 13

def ready?(str)
  new.ready?(str)
end

.winning?(str) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/tenpai_wakaru_man.rb', line 9

def winning?(str)
  new.winning?(str)
end

Instance Method Details

#ready?(tiles) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/tenpai_wakaru_man.rb', line 25

def ready?(tiles)
  Parser.parse(tiles).ready?
end

#winning?(tiles) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/tenpai_wakaru_man.rb', line 21

def winning?(tiles)
  Parser.parse(tiles).winning?
end