Check out Symmetric Chess, our featured variant for March, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Later Reverse Order Earlier
Zillions of Games. It can play an endless variety of abstract board games, and we have a large collection of Chess variants you can play on it.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Wed, Nov 8, 2023 06:11 PM UTC in reply to Fergus Duniho from 04:37 PM:

Since the first two conditions have the same effect, this might also work:

(define push-n (n (while on-board? (if (or empty? (in-zone? board-edge-n)) add else (cascade n)))))

And let's try a general push routine without the zone:

(define push ($1 (while on-board? (if (or empty? (not-on-board? $1)) add else (cascade $1)))))


🕸📝Fergus Duniho wrote on Wed, Nov 8, 2023 04:37 PM UTC in reply to Michael Nelson from 03:10 AM:

Using (verify false) is a clever idea. It's sort of like using return in a function for some other language. You might have gotten the same effect by using else. For example, this might work:

(define push-n (n (while on-board? (if empty? add else (if (in-zone? board-edge-n) add else (cascade n))))))

However, it does use else twice to create an if-elseif-else structure, and breaking out with something like a return is an equally valid way to handle this.


Michael Nelson wrote on Wed, Nov 8, 2023 03:10 AM UTC:

This code works perfectly with correctly defined zones:

(define push-n (n (while on-board? (if empty? add (verify false))(if (in-zone? board-edge-n) add (verify false)) cascade n))) (define push-e (e (while on-board? (if empty? add (verify false))(if (in-zone? board-edge-e) add (verify false)) cascade e))) (define push-s (s (while on-board? (if empty? add (verify false))(if (in-zone? board-edge-s) add (verify false)) cascade s))) (define push-w (w (while on-board? (if empty? add (verify false))(if (in-zone? board-edge-w) add (verify false)) cascade w)))

The (verify false)'s are essential to stop move generation when the final square is found, otherwise, Zillions crashes. I decided to use rook-wise pushes to complement the piece's bishop-like move.


🕸📝Fergus Duniho wrote on Tue, Nov 7, 2023 04:15 PM UTC in reply to Michael Nelson from 03:10 PM:

You could test each space with on-board? or not-on-board? and provide a different move when the space is not on-board.


Michael Nelson wrote on Tue, Nov 7, 2023 03:10 PM UTC:

I solved the Mason move by using single-step moves and add-partial.

The last piece I'm coding can push a line of pieces. This almost does what I want:

(define push ($1 (verify not-empty?) cascade (while (not-empty? $1) $1 cascade) $1 add))

But if the piece at the end of the line is at the edge of the board, I want to capture it (push it off the board). The above code disallows the move if the last piece is at the board's edge. I wonder if there is a solution using zones or dummy squares.

The piece is inspired by Nemeroth's Go Away (but it can only push one line at a time, and any effects of or on the pushed pieces are ignored).

Indeed, the whole game is inspired by Nemeroth, but on the whole, it's much simpler to code in Zillions. There is an unapproachable piece, a piece that turns the target square to stone (by a rifle-capture-like move), a piece that moves and captures as a king, a piece that lays down a line of stones, and so on. Stones do not move on their own but can be captured or pushed (a bit like ichor without the bookkeeping). Victory is by stalemate or opponent's repetition. There is no concept of compulsion or multiple-occupancy squares.

My game loses much of Nemeroth's peculiar flavor but is interesting in its own right. Pushing pieces of the board will make it complete. I will need to clean up the Zillions file and author a page.


🕸📝Fergus Duniho wrote on Mon, Nov 6, 2023 03:59 PM UTC in reply to Michael Nelson from 01:53 PM:

For a slide, you need a loop. Since I don't know how your Mason piece moves, I'll give you an example from the Chess.zrf:

(define slide        ($1 (while empty? add $1) (verify not-friend?) add))

This can be used for Bishop, Rook, or Queen moves, though it does have a special one for Rook moves that also sets an attribute for whether it can still castle to false.

The main feature that makes this a slide instead of a single-step move is the while loop. $1 is the parameter with the value of the direction to move. After moving once in this direction, it checks whether it is empty, and if it is empty, it allows the move with the add command, and it moves again in the same direction. If it reaches an occupied space or the end of the board, it breaks out of the loop, because the empty? condition is no longer met. At this point, it tests the same space with (verify not-friend?) to tell whether it is one without a piece belonging to the same player. If it's an enemy piece or empty, it will allow the move with the add command.

The Rook-slide looks like this:

(define rook-slide (
  $1
  (while empty? (set-attribute never-moved? false) add $1)
  (verify not-friend?)
  (set-attribute never-moved? false)
  add
))

This uses the same method of a while loop, but in addition to allowing a move to a certain space, it makes sure that the allowed move includes the the operation of setting the attribute never-moved? to false.


Michael Nelson wrote on Mon, Nov 6, 2023 01:53 PM UTC:

The Zillions user forum seems dead. I registered, but can't start a new topic.

I have the following move macro:

(define Mason-step ((verify (empty? $1))(create Stone) $1 add))

How do I turn this into a slide? All my attempts are generating pares errors.


Robert Mate wrote on Fri, Nov 5, 2021 08:31 AM UTC in reply to Fergus Duniho from Sun Oct 17 01:49 AM:

Yes, that's what I did. We were in the same room and couldn't get it connected up in Windows 10 :p


🕸📝Fergus Duniho wrote on Sun, Oct 17, 2021 01:49 AM UTC in reply to Robert Mate from Sat Oct 16 10:08 AM:

Guess I could try emulating windows 95

I don't think that will help. I think you just need to coordinate with another person who is willing to play against you at a certain time.


Robert Mate wrote on Sat, Oct 16, 2021 10:08 AM UTC in reply to Fergus Duniho from Tue Aug 31 08:46 PM:

Guess I could try emulating windows 95


🕸📝Fergus Duniho wrote on Tue, Aug 31, 2021 08:46 PM UTC in reply to Robert Mate from 04:48 PM:

I haven't used it that way since I had Windows 95. When I did, I arranged with another person regarding the time and game we would play together, and I believe I was in communication with him while setting up the connection for Zillions-of-Games. But I do not remember the steps we went through to do that. Also, back then, I had a dial-up internet account. I now have broadband, which works differently, and I don't know if that will make a difference.


Robert Mate wrote on Tue, Aug 31, 2021 04:48 PM UTC in reply to danielmacduff from Sat Jun 3 2017 09:21 PM:

Still works in Windows 10, but can't get any internet play to work. If anyone out there knows how to set it up I'd be grateful.


danielmacduff wrote on Sat, Jun 3, 2017 09:21 PM UTC:

Have the links to .zrf's been cut as a part of the move?  All the download links I've looked at today have sent me back to the home page.


13 comments displayed

Later Reverse Order Earlier

Permalink to the exact comments currently displayed.