Closed saloparenator closed 10 years ago
tile who shoot a bullet or spawn minion can self-tag shooting-direction or spawnat...
but now who will capture this and add new tile every frame?
so we need an ethereal function collection that look at the world and can yield many object maybe this system will merge with IO event and timer
we can already tell that when a tile self modify, it transform (map) and when we spawn new tile, we yield (generate)
we are close to a mapreduce-like system
observing the idea that the tag80 could have a T transform(T,world) method and a T[] spawn(T,world) method but it does not cover the etereal event
the new solution fit lot of use case ex: tile wont need to remove other tag it carry than self
player moving: self modify coordinate player shooting: add new tile in direction tagged bullet bullet: move until collision then return dead tile
tile must be able to add new tag to itself (++ tag to the next world) tile must be able to add new tile (add those tile to the next world) tile must be able to change coordinate (change coord pair to the next world) tile must be able to kill it self (not being added to the next world) your returning tag must be differentiate to the one you spawn (cause your will be processed to the rest of your tag, the one you spawn will only be processed next frame)
that still does not cover the io event management
use case gameoflife alive cell spawn neighbor to the pool if count(neighbor.neighbor)==2 or 3 alive cell carry on if neighbor count==3
tag{
pos move(symbol, x,y, world); function
bool keepTag(symbol,x,y,world); predicate
Iterable
i will build an immutable object that carry all Tile info and its own world this tile will have factory that yield modified version of it self and getter. Tile80 will be renamed as World80, all its function will yield that object (called Tile80)
the usage of the tag will be easier getWorld().get.... tile.changePos(..).addTag(...).notPerpetuTradition().spawnNewTile(symbol,x,y,tag) ... spawning will be supported by the same function
solved closing the issue
if a tile can only modify self how it will spawn new one (bullet)