Project: threejs
Task (challenging): Create candy.js imported by index.js 1: Generate a pink spherical object with a radius of 0.3 and name it candy. 2: Place the candy in the center of the cell at the top-left corner of the map. If the current cell is occupied(eg: snake or other objects), move one cell to the right. If it encounters a fence, move to the leftmost cell of the next row. Continue this process until the candy is successfully placed. 3: When the candy eaten by snake, reposition the candy to a new cell according to the above rules.