Skip to content

Commit

Permalink
Tail chase more health
Browse files Browse the repository at this point in the history
  • Loading branch information
Petah committed Sep 3, 2020
1 parent 98fa057 commit cdbbbbd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/server/snakes/tail-chase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit cdbbbbd

Please sign in to comment.