Stop digging outside of dungeon


Currently the player is able to dig passed the dungeon edge, how would you stop this?

  • Nathan Lovato replied

    The simplest way right now would be to update the remove_walls() function to check for the bounds of the map. You want to check that cell.x > 0 and cell.y > 0 and cell.x < MAP_SIZE.x and cell.y < MAP_SIZE.y. If any of the conditions is false, you want to continue the loop.

    That would be a good starting point.

    1 love