Method: ChessRB::Position#initialize
- Defined in:
- lib/chess_rb/position.rb
#initialize(fen) ⇒ Position
Returns a new instance of Position.
6 7 8 9 10 11 |
# File 'lib/chess_rb/position.rb', line 6 def initialize(fen) @fen = fen @fen_components = fen.split(' ') @board = fen_to_board(fen) @valid = valid? end |