Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why keep images in tiles graphic array? #37

Open
Deg42 opened this issue Jul 11, 2022 · 0 comments
Open

Why keep images in tiles graphic array? #37

Deg42 opened this issue Jul 11, 2022 · 0 comments

Comments

@Deg42
Copy link

Deg42 commented Jul 11, 2022

By this time, there are duplicated tiles, one as an image and one as graphic:

  const initialTileCount = tiles.length;
  for (let i = 0; i < initialTileCount; i++) {
    let tempTiles = [];
    for (let j = 0; j < 4; j++) {
      tempTiles.push(tiles[i].rotate(j));
    }
    tempTiles = removeDuplicatedTiles(tempTiles);
    tiles = tiles.concat(tempTiles);
  }
  console.log(tiles.length);

Example:
Screnshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant