Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/tutorial/part-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class Stage {
for (let r=1; r<rooms.length; r++) {
if (Math.random() > 0.6) continue;
const spawnAt = rooms[r].center();
this.addEntity(new Entity(spawnAt.x, spawnAt.y, "monster"));
this.addEntity(new Entity(spawnAt.x, spawnAt.y, "monster", { blocking: true }));
}
}

Expand Down Expand Up @@ -303,7 +303,7 @@ function update() {
const mx = stage.player.x + action.x;
const my = stage.player.y + action.y;

if (stage.canMoveTo(mx, my) && stage.isUnoccupied(x, y)) {
if (stage.canMoveTo(mx, my) && stage.isUnoccupied(mx, my)) {
stage.moveEntityTo(player, mx, my);
stage.refreshVisibility();
}
Expand Down