Method: Uci#clear_position

Defined in:
lib/uci.rb

#clear_position(position) ⇒ Object

clear a position on the board, regardless of occupied state

Raises:



233
234
235
236
237
238
# File 'lib/uci.rb', line 233

def clear_position(position)
  raise BoardLockedError, "Board was set from FEN string" if @fen
  rank = RANKS[position.to_s.downcase.split('').first]
  file = position.downcase.split('').last.to_i-1
  @board[file][rank] = nil
end