Java implementation of the game snake for  CS112