function snakeEating() {
    let foodEaten = [];
    foods.forEach(f => {
        if (eatingDistanceValid(snake, {
            x: f.x,
            y: f.y,
            size: f.size
        })) foodEaten.push(f);
    });
    return foodEaten;
}
/**
 * check if any food in FOODS array is eaten by snake
 * @returns list of refs to items in FOODS array
 */
check if any food in FOODS array is eaten by snake
@returns list of refs to items in FOODS array
check if any food in FOODS array is eaten by snake @returns list of refs to items in FOODS array
function snakeEating() {
    let foodEaten = [];
    foods.forEach(f => {
        if (eatingDistanceValid(snake, {
            x: f.x,
            y: f.y,
            size: f.size
        })) foodEaten.push(f);
    });
    return foodEaten;
}
function snakeEating ( ) { let foodEaten = [ ] ; foods . forEach ( f => { if ( eatingDistanceValid ( snake , { x : f . x , y : f . y , size : f . size } ) ) foodEaten . push ( f ) ; } ) ; return foodEaten ; }
check if any food in FOODS array is eaten by snake
 @returns list of refs to items in FOODS array
check if any food in FOODS array is eaten by snake @returns list of refs to items in FOODS array