Some chess problem resolver in scala