From cdbbbbd31aeb28ecb23afea586903a6e74e2b290 Mon Sep 17 00:00:00 2001 From: David Neilsen Date: Fri, 4 Sep 2020 00:31:16 +1200 Subject: [PATCH] Tail chase more health --- src/server/snakes/tail-chase.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server/snakes/tail-chase.ts b/src/server/snakes/tail-chase.ts index 7e7e755..3bea705 100644 --- a/src/server/snakes/tail-chase.ts +++ b/src/server/snakes/tail-chase.ts @@ -20,12 +20,9 @@ export class TailChase extends BaseSnake implements ISnake { move(data: BTData) { let direction; - if (data.you.health < 5) { + if (data.you.health < data.board.width || data.you.health < data.board.height) { direction = moveTowardsFoodPf(data); } - // if (!direction) { - // direction = moveAway(data, 5); - // } if (!direction) { direction = moveTowardsTail(data); }