3 ms·
Can you share it with us?
by chedoku 3y ago
Can you share it with us?
- zzo38computer 3y agoHere it is: (InputXY) (Control (INIT $Cursor 1 1 0 0 Create =@cur) ) ($Cursor Player (Image "Cursor0" "Cursor1") (DefaultImage ()) (Density -10) (CREATE LOOP 0 1 50 Animate) ) ($Tile (Image "Tile0" "Tile1") (Density 10) (INIT Loc + 1 band =Image) (CLICK @cur ,ObjBelow #Move Loc ,Send . 1) ) ($White Input (Image "P" "N" "B" "R" "Q" "K") (CLICK @cur Loc ,MoveTo) (#Move ,:movable if Arg1 Arg2 MoveTo . Arg3 if From ,Image =Image From ,Destroy . (=P $Black) lnot if WinLevel then then @cur Loc ,MoveTo . then ) (:movable Image (case (0 :pawn) (1 :knight) (2 :bishop) (3 :rook) (4 :queen) (5 :king) ) ) (:pawn Yloc Arg2 1 + eq Xloc Arg1 Delta Arg3 eq land) (:knight Xloc Arg1 Delta dup * Yloc Arg2 Delta dup * + 5 eq) (:bishop Xloc Arg1 Delta Yloc Arg2 Delta eq if =:queen else 0 then) (:rook Xloc Arg1 Delta Yloc Arg2 Delta land if 0 else =:queen then) (:queen From Seek =%d Loc begin %d NewXY over over ObjTopAt dup From eq if . . ret then ,Class $Tile ne until . . 0) (:king From Chebyshev 1 eq) (#Destroy From Self ne if From #Move Loc 1 ,SendEx . then Destroyed lnot ) ('D @cur Coloc if $White #Destroy Loc BroadcastAnd . then ) ) ($Black (Image "PB" "NB" "BB" "RB" "QB" "KB") (CLICK @cur ,ObjBelow #Move Loc 1 ,SendEx . 1) ) (Free Hero Mesh itself can be found on GitHub at https://github.com/zzo38/freeheromesh https://github.com/zzo38/freeheromesh)
- chedoku 3y agoThanks. Interesting. Reminds me of https://ludii.games https://ludii.games