basic chess engine in Ruby