Class: Mjai::TsumogiriPlayer

Inherits:
Player
  • Object
show all
Defined in:
lib/mjai/tsumogiri_player.rb

Instance Attribute Summary

Attributes inherited from Player

#attributes, #extra_anpais, #furos, #game, #ho, #id, #name, #reach_ho_index, #reach_state, #score, #sutehais, #tehais

Instance Method Summary collapse

Methods inherited from Player

#anpais, #can_hora?, #can_reach?, #can_ryukyoku?, #context, #create_action, #delete_tehai, #double_reach?, #furiten?, #get_pais_combinations, #inspect, #ippatsu_chance?, #jikaze, #kuikae_dahais, #possible_actions, #possible_dahais, #possible_dahais_after_furo, #possible_furo_actions, #rank, #reach?, #rinshan?, #tenpai?, #update_state

Instance Method Details

#respond_to_action(action) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/mjai/tsumogiri_player.rb', line 8

def respond_to_action(action)
  case action.type
    when :tsumo, :chi, :pon
      if action.actor == self
        return create_action({:type => :dahai, :pai => self.tehais[-1], :tsumogiri => true})
      end
  end
  return nil
end