implementation of the 4 row game