fix apple functionality. TODO: make snake longer when eating an apple