GE HealthCare Interview Question

Please code the classic Snake game.