chore: sync
This commit is contained in:
@@ -91,12 +91,15 @@ function is_area_red_green(
|
||||
const bl_corner: Coordinate = { x: min_x, y: max_y };
|
||||
const br_corner: Coordinate = { x: max_x, y: max_y };
|
||||
|
||||
// Find valid closers
|
||||
// Every corner needs to be surrounded
|
||||
|
||||
// NOTE: I don't think this will be enough
|
||||
// Maybe not cover corners and cover verticals
|
||||
// l
|
||||
// NOTE: need to check exact pairs, so they create a line somehow
|
||||
// - Every corner is surrounded
|
||||
// - Every surround must form a line
|
||||
// old: Every corner needs to be surrounded
|
||||
// Error 1: 4560365591
|
||||
// Verify left wall
|
||||
// floor.red_tiles.some((tile) => {
|
||||
// // point and side or point and point and the inverse
|
||||
// });
|
||||
const l_cover =
|
||||
floor.red_tiles.some((tile) =>
|
||||
tile.x <= tl_corner.x && tile.y <= tl_corner.y
|
||||
@@ -120,9 +123,9 @@ function is_area_red_green(
|
||||
// t
|
||||
const t_cover =
|
||||
floor.red_tiles.some((tile) =>
|
||||
tile.x <= tr_corner.x && tile.y <= tr_corner.y
|
||||
tile.x >= tr_corner.x && tile.y <= tr_corner.y
|
||||
) && floor.red_tiles.some((tile) =>
|
||||
tile.x >= tl_corner.x && tile.y <= tl_corner.y
|
||||
tile.x <= tl_corner.x && tile.y <= tl_corner.y
|
||||
);
|
||||
|
||||
return l_cover && r_cover && b_cover && t_cover;
|
||||
|
||||
Reference in New Issue
Block a user