Open cdeevfrr opened 2 years ago
If a position attempts to move into a node that doesn't exist:
EX in 2d (photon is P, it's moving up, bottom left E is [0,0]):
EPE EEE EEE
Create new node with coords [1, 3]
N EPE EEE EEE
Check for P's left neighbor's up. If exists, connect to the new node
? N ^ E<-P E E E E E E E
Same check for p's right neighbor's up.
If a position attempts to move into a node that doesn't exist:
EX in 2d (photon is P, it's moving up, bottom left E is [0,0]):
Create new node with coords [1, 3]
Check for P's left neighbor's up. If exists, connect to the new node
Same check for p's right neighbor's up.