//update the snake motion while it alive public void updateSnake(Snake thisSnake, Snake anotherSnake) { //check if the sanke crash the body of itsself //then check if the sanke has ever been crashed //last, check if the snake is crashing with another snake's body if (!thisSnake.BodyCollision() && !thisSnake.headCollisionFlag && thisSnake.headNoCollision(anotherSnake)) { // Update sanke thisSnake.Update(gameTime); } }