Method: ChessData::Moves::KingsideCastles#make_move

Defined in:
lib/chess_data/moves.rb

#make_move(board) ⇒ Object

Depending on the colour to move, will either castle king-side for white or black. Returns a new instance of the board.



146
147
148
149
150
151
152
# File 'lib/chess_data/moves.rb', line 146

def make_move board
  if board.to_move == "w"
    white_castles board
  else
    black_castles board
  end
end