blaumeise20 / jell-machine

A remake of the game "Cell Machine" written in JavaScript.
30 stars 11 forks source link

Reworking Cell.push() #12

Open NKY5223 opened 2 years ago

blaumeise20 commented 2 years ago

Pushing will soon be updated to be non-recursive. Then there will be a "lastcell" parameter that always specifies the pushing cell (makes acids possible, cells that destroy what they are pushed into)

NKY5223 commented 2 years ago

How do you plan to achieve this?

blaumeise20 commented 2 years ago
const [ox, oy] = dirToOff(cell.direction);
const genCell = grid.getCell(x+ox, y+oy);
if (!genCell) return;
pushCell(x, y, direction, { force: 42, lastcell: genCell.clone() })

This would be example generator code.

NKY5223 commented 2 years ago

42-?

NKY5223 commented 2 years ago

yea but how would you code this

pushCell(x, y, direction, { force: 42, lastcell: genCell.clone() })
NKY5223 commented 2 years ago

update cell.push when

blaumeise20 commented 2 years ago

never :trell:

No, I will work on it probably after the first release.

NKY5223 commented 2 years ago

update nowwwwwww you already released now remake jell machine

uku1928 commented 2 years ago

Cell.push is as good as it is... just need to fix some diverger stuff

NKY5223 commented 2 years ago

u p d a t e

uku1928 commented 2 years ago

Yes, update diverger interaction

NKY5223 commented 2 years ago

what diverger

uku1928 commented 2 years ago

Redirector... My mind is CelLuaified so yeah update Redirectors, Tunnels, Crossways and Crossdirectors.

blaumeise20 commented 2 years ago

Yes yes don't be annoying. I also have a private life 😀