tiny refactor of entity code.

This commit is contained in:
HyperOnion 2023-06-24 12:47:08 +02:00 committed by transoptimal
parent e40eede84d
commit 4dbb92c951
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);
}