tiny refactor of entity code.
This commit is contained in:
parent
e40eede84d
commit
4dbb92c951
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue