Method: Uci#send_position_to_engine

Defined in:
lib/uci.rb

#send_position_to_engineObject

write board position information to the UCI engine, either the starting position + move log or the current FEN string, depending on how the board was set up.



102
103
104
105
106
107
108
109
110
# File 'lib/uci.rb', line 102

def send_position_to_engine
  if @fen
    write_to_engine("position fen #{@fen}")
  else
    position_str = "position startpos"
    position_str << " moves #{@moves.join(' ')}" unless @moves.empty?
    write_to_engine(position_str)
  end
end