Skip to content

Commit 0271803

Browse files
committed
Simplefied.
1 parent d1c278c commit 0271803

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

arena.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,11 @@ function tick(){
395395
let occupiedBy = space.getOccupiedBy();
396396
if(occupiedBy !== null){
397397
switch(occupiedBy.constructor.name){
398+
case 'TrailingBody':
399+
occupiedBy = occupiedBy.getHead();
398400
case 'SolidWorm':
399401
occupiedBy.kill();
400402
break;
401-
case 'TrailingBody':
402-
occupiedBy.getHead().kill();
403-
break;
404403
}
405404
}
406405
if(occupiedBy === null || occupiedBy.constructor.name !== 'Wall'){

0 commit comments

Comments
 (0)