Neighbors
Neighbors
Rules
- Each square can have 0 to 8 numbered neighbors.
- A digit shows how many numbered neighbors its square must have.
- A numbered square with the correct number of neighbors lights on.
- To win the game, all numbered squares must be lighted on. That winning condition is only visual (no checking from the program because of code restrictions - 560 chars max).
- There is at least one solution, but many others are correct too.
- Each run starts a whole new game.
Controls
- To switch squares, use mouse + left or right button to drag & drop one square on another.
- To start another game press Enter and select "Reset cart".
The game was made for the Thinky Puzzle Game Jam and in 560 chars or less for the Tweet Tweet Jam 6. If you have Pico-8 you can copy & paste the code below to play the exact same game on it. You may change the difficulty by modifying the F value on 1st line (=3). If F≤1 no squares are numbered (empty game). Higher values add more numbered squares... to the point where ALL squares are numbered, which makes the puzzle almost as easy as having no numbers at all.
poke(24365,1)z=0f=3c={}o=0m=stat::_::cls()for a=0,63do x=a%8y=a\8g=x*16h=y*16 if z<1then c[a]=-2 if(x%7*(y%7)>0)c[a]=rnd(f)\1-1 end b=c[a]k=rnd(55)\1 if(z==2and b>-2and c[k]>-2)c[k],c[a]=b,c[k] if z%2>0then s=-1 for m=-1,1do for n=-1,1do if(b<0or c[a+m*8+n]>=0)s+=1 end end if(z==1and b>=0)c[a]=s end b=c[a]i=5j=5 if(s==b)i=9j=10rectfill(g,h,g+14,h+14,4) ?b,g+6,h+5,b<0or j if(a==o)i=12 if(a==p)i=7 if(b>-2)rect(g,h,g+14,h+14,i) end p=mid(1,m(33)\16,6)*8+mid(1,m(32)\16,6) if(o<1and m(34)>0)o=p if(o>0and m(34)<1)c[o],c[p]=c[p],c[o]o=0 z=min(3,z+1)flip()goto _
Download
Download NowName your own price
Click download now to get access to the following files:
neighbors_windows.zip 1 MB
neighbors_osx.zip 3.2 MB
neighbors_linux.zip 683 kB
neighbors_raspi.zip 1.4 MB
Leave a comment
Log in with itch.io to leave a comment.