Skip to content

Commit e2f3119

Browse files
committed
Add return info to function docs
1 parent a63692b commit e2f3119

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

js/snake.js

+4
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ SNAKE.Snake = SNAKE.Snake || (function() {
352352
/**
353353
* This method is called when it is determined that the snake has eaten some food.
354354
* @method eatFood
355+
* @return {bool} Whether a new food was able to spawn (true)
356+
* or not (false) after the snake eats food.
355357
*/
356358
me.eatFood = function() {
357359
if (blockPool.length <= growthIncr) {
@@ -1019,6 +1021,8 @@ SNAKE.Board = SNAKE.Board || (function() {
10191021
/**
10201022
* This method is called when the snake has eaten some food.
10211023
* @method foodEaten
1024+
* @return {bool} Whether a new food was able to spawn (true)
1025+
* or not (false) after the snake eats food.
10221026
*/
10231027
me.foodEaten = function() {
10241028
elmLengthPanel.innerHTML = "Length: " + mySnake.snakeLength;

0 commit comments

Comments
 (0)