1 require 'games/shogi/state'
2 require 'games/shogi/pool'
3 require 'games/shogi/move'
4 require 'games/shogi/validator'
5 require 'games/shogi/policy'
6 require 'plugins/plugin'
7 require 'games/game_actions'
15 plugin :name => 'Shogi',
18 :keywords => %w(shogi),
21 attr_reader :size, :state, :board, :pool,
22 :policy, :move, :animator, :validator,
23 :piece, :players, :types
26 @size = Point.new(9, 9)
27 @state = Factory.new { State.new(board.new, pool, move, piece) }
28 @board = Factory.new { chess.board.component.new size }
32 @validator = Validator
33 @animator = chess.animator
34 @policy = Factory.new(Policy) { Policy.new(move, validator, true) }
36 @players = [:white, :black]
37 @types = [:pawn, :lance, :horse, :silver,
38 :gold, :bishop, :rook, :king]
42 :text => '&Promote Automatically' do |value, policy|
43 policy.autopromote = value