CodingTrain / CodingTrain/Wave-Function-Collapse
Why keep images in tiles graphic array?
- Dominant language
- JavaScript
- Stars
- 218
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
By this time, there are duplicated tiles, one as an image and one as graphic:
``` javascript
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:

Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing where the tiles array is initialized and how rotate() and removeDuplicatedTiles() are used in the shown expansion loop. Compare the image and graphic entries in the linked screenshot, then determine whether both representations are required. Done means the issue has a documented rationale or an agreed, tested simplification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100