CodingTrain / CodingTrain/Wave-Function-Collapse

Why keep images in tiles graphic array?

Open
#37 1 comment 0 reactions 0 assignees View on GitHub
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:
![Screnshot](https://user-images.githubusercontent.com/73712866/178241572-efc1a935-2afd-4222-b19e-bd0d1148bfca.PNG)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.