ruby implementation of checkers