Module: SGF::Model
- Defined in:
- lib/sgf/model/game.rb,
lib/sgf/model/node.rb,
lib/sgf/model/constants.rb,
lib/sgf/model/event_listener.rb,
lib/sgf/model/property_handler.rb
Defined Under Namespace
Modules: Constants Classes: EventListener, Game, Label, Node, PropertyHandler
Constant Summary collapse
- GAME_PROPERTY_MAPPINGS =
See www.red-bean.com/sgf/properties.html for property definitions
{ 'GM' => :game_type=, 'GN' => :name=, 'RU' => :rule=, 'SZ' => :board_size=, 'HA' => :handicap=, 'KM' => :komi=, 'PW' => :white_player=, 'BR' => :black_rank=, 'PB' => :black_player=, 'WR' => :white_rank=, 'BT' => :black_team=, 'WT' => :white_team=, 'DT' => :played_on=, 'TM' => :time_rule=, 'OT' => :overtime_rule=, 'SY' => :program=, 'RE' => :result=, 'AP' => :program=, 'PC' => :place=, 'EV' => :event=, 'RO' => :round=, 'SO' => :source=, 'AN' => :annotation=, 'GC' => :comment= }
- GAME_MISC_PROPERTIES =
%w(FF US CA ST)
- NODE_PROPERTY_MAPPINGS =
{ "B" => :sgf_play_black, "W" => :sgf_play_white, "C" => :comment=, "AB" => :sgf_setup_black, "AW" => :sgf_setup_white, "AE" => :sgf_setup_clear, "LB" => :sgf_label, "PL" => :whose_turn= }
- NODE_MARK_PROPERTIES =
%w(AR CR DD LB LN MA SL SQ TR)
- NODE_TIME_PROPERTIES =
%w(BL WL OB OW TB TW)
- NODE_MISC_PROPERTIES =
%w(N GW GB DM UC TE BM DO IT MN) + NODE_MARK_PROPERTIES + NODE_TIME_PROPERTIES
- GAME_PROPERTY_HANDLER =
PropertyHandler.new(GAME_PROPERTY_MAPPINGS, GAME_MISC_PROPERTIES)
- NODE_PROPERTY_HANDLER =
PropertyHandler.new(NODE_PROPERTY_MAPPINGS, NODE_MISC_PROPERTIES)