tiny refactor of entity code.

This commit is contained in:
transoptimal 2023-06-24 12:47:08 +02:00
parent 94575303aa
commit ffd9504c9a
1 changed files with 1 additions and 3 deletions

View File

@ -59,7 +59,5 @@ export function move (entity, d_x, d_y) {
}
function out_of_bounds (entity) {
const { x, y } = entity;
return x < 0 || x >= BOX_SIZE ||
y < 0 || y >= BOX_SIZE
return world.out_of_bounds(entity.x, entity.y);
}