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

multi-squares in multi-squares in ... #362

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Paalui
Copy link
Contributor

@Paalui Paalui commented Sep 7, 2024

Did this a while ago, but wanted to find a neater solution. Didn't find one and forgot to do it so ill just PR it now if you want to use it.

I did:

Stuff i am not happy with/ is janky:

  • The merge instruction merges m∗n cells. When i want to merge this: ⊞⊟ it isn't m∗n. Because the merge instruction is inplemented by merging next m∗n cells, i just tell it to merge n∗1 cells (6∗1 in the case of ⊞⊟).
  • I implemented almost the same thing three times.
    • flattenAndFillDiagramCells it flattens nested cells and fills the voids.
    • addDiagramCellsToLeftList it does the same but for rule gen on the left side. Also it returns what structure the nested cell had.
    • addDiagramCellsToRightList it does the same but for rule gen on the right side and it uses the structure to tell when merge/split
  • Because the rule update needs nested cells, multi-cells have to be flattened every time they get used else where (in the splitCellToDiagram function).

I changed the splitCellToDiagram and the updatePaddleRule function to go recursivcely through all diagrams. Also empty cells in a diagram get replaced with a cell.
If a cell on both sides are split the same they only get recoloured.
If they are split the same but they have a different multi-multi cell structure it still merges and splits.
eg: left has a 1x4 multicell and right has 1x2 multi cell with 1x2 multi cells in it. That still doesn't work.
Copy link

netlify bot commented Sep 7, 2024

Deploy Preview for keen-boyd-1443aa ready!

Name Link
🔨 Latest commit ebab6c7
🔍 Latest deploy log https://app.netlify.com/sites/keen-boyd-1443aa/deploys/66dbab0171cf2900088cd5ac
😎 Deploy Preview https://deploy-preview-362--keen-boyd-1443aa.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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

Successfully merging this pull request may close these issues.

A multi-square in a multi-square doesn't get brushed properly
1 participant