Play game
Jelpi-Knights's itch.io pageCharacter Count498
Code
z={2,32,33}●=0::b::e=0♥=●+1♪={0,0,0}g=0cls()😐=btnp()if(😐==32)●=♥%3
if(😐==2)e=33
if(😐==8)e=18
z[♥]+=e
for ⌂=63,0,-1do
x=(⌂&~7)>>3y=⌂&7v={}★=x<<4⧗=y*12for i=1,2do
q=x-i+3r=y+i
v[pget(16*q,12*r)-1]=r+q*16end
j=0::j::?"\^w\^t█",★,⧗,j+1
for k=1,3do
█=6if(♥==k)█=10
if(x<<4|y==z[k])g^^=(♪[k]^^j)♪[k]=j ♪[8*k+j]=v[j]?"🐱",★+2*k,⧗+k,█
end
if(v[j])j+=1goto j
end
::a::for k=1,3do
if(z[k]&136>0)cls(e%31)stop()
t=♪[8*k+(g^^♪[k])]if(e>0and t)z[k]=t e=0end
if(e<1)flip()goto b
z[rnd{1,2,3}]+=rnd{33,18}e=0goto a
Leave a comment
Log in with itch.io to leave a comment.



Comments
Is player 1 at a serious disadvantage here, or am I just bad at this puzzle? Took me way too long to figure out a winning play, and I'm still not sure if it was just by luck. Still, surprising amount of fun for 500 chars. I assume there's some parity-based solution somewhere, but I haven't figured it out yet.
Hey, thanks for playing the game! I chose the initial position of the game so that the first player was guaranteed to have a winning strategy, but also the computer player does have perfect play if the player hands it a winning position. The colors of the squares are significant to the winning strategy: for example, you might try convincing yourself that any position where all knights are on blue squares is a position that loses for the player to move.
(In slightly more mathematical terms, if you think of the moves that push a knight off-board as not actually being available, then this is a normal-play impartial game, so it's Nim in disguise.)
it may interest you to know that there is now a WIP cart available for an expanded version of this game: https://www.lexaloffle.com/bbs/?tid=157612
right now the WIP is still very much in its infancy, but it's at least feature-comparable to the jam version of the game, and I think it looks and controls much nicer