Solving chess puzzles with ruby