Ratings & Comments
I'm actually starting to lean back towards the Bishop + Squirrel move for Chu Seireigi and Dai Seireigi, since in my test game of Chusei with you, if the Lion had the KNAD move you would be able to force mate in 3 with just the Lion, and I don't want one piece to steal all the show from the others.
Edit: Looking at the current position you can still force mate in 3, but you need to get more pieces involved.
if == 0 $mline[$mln]->movenum:
That is mixing GAME Code with PHP. GAME Code does not support classes with properties or write out array elements with brackets, and it doesn't provide read access to $mline. But you can use the value of turn
with your knowledge of which side you're concerned with to determine where you are in a game.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
OK, so the betza.txt code, which thus aims to test for whether the move is the one that was just entered, would work fine even in the presence of comments?
And the code to test for whether we are in prelude should look like
if == 0 $mline[$mln]->movenum:
?
I am not familiar with this technique, but a problem could be that it is not just about positioning the images, but also about translating mouse clicks to cell coordinates. (Which must also work for empty cells, for entering non-captures.) In the table version I have attached event handlers to the cells for this.
With grid, you would use a <div>
tag instead of a <td>
tag for each space, and you could attach event handlers to it just as easily. What I have done in Game Courier, though, is place a transparent image over each empty space, as I have attached event handlers to the piece images.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
set all == mln $maxmln; // indicates last move
Note there is no $ there, so we might be talking about different things, and this one might be a legacy variable.
This operator just outputs the value of $mln.
I cannot image how this would work if mln was not the current move number.
It works because you are comparing mln with its maximum value. When there are comments, $maxmln will be greater than any move number, but it will be no higher than mln will eventually reach.
I am not aware of any such sources.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
Using grid would probably help you avoid this problem too. With grid, you should be able to make one column or row diagonal, though I have not yet tried using grid with hexagonal boards. My CSS code for hexagonal boards uses absolute positioning, as grid was not yet part of CSS when I wrote the code. Anyway, absolute positioning is another alternative to using tables.
I am not familiar with this technique, but a problem could be that it is not just about positioning the images, but also about translating mouse clicks to cell coordinates. (Which must also work for empty cells, for entering non-captures.) In the table version I have attached event handlers to the cells for this.
From what I gather, several sources exist, with different movesets. As I don't read japanese, is there anyone who knows what the other movesets are, and how credible they are as sources for Wa?
It does not. I have made that mistake too and had to correct it. To use
$mln
to get the move number, you need to get$mline[$mln]->movenum
.
This is somewhat important, because the first things that the HandleMove routine does in the betza.txt include after the move is parsed is:
set all == mln $maxmln; // indicates last move
Note there is no $ there, so we might be talking about different things, and this one might be a legacy variable. The purpose here is to determine whether the subsequent move generation needs to generate all pseudo-legal moves, and compare the input move against those for testing its legality. Or whether it can simply assume the move is legal, because it is not the final move of the stored game, and thus must already have passed the legality test on the turn where it was entered. If the latter is the case only the moves with implied side effects are generated, (e.g. e.p. capture or castling), for the purpose of reconstructing the side effect, and apply it to the board together with the entered move.
I cannot image how this would work if mln was not the current move number.
The I.D. represents the board through a HTML table,
Game Courier used to use HTML tables for hexagonal boards, but I gave up on this in favor of using either CSS with a board image or drawing the board image. This reminds me that I was working on getting CSS to work with a generated board image so that you could view each position of the game without reloading the page, but I haven't completed that. I think I had two different approaches and wasn't sure which one to go with. I either wanted to change how I generated the board so that the image would be perfectly symmetrical, or I wanted to modify the code to work with the asymmetrical boards I was already generating. I lost sight of what I was doing when I got caught up with other projects.
in theory it should be possible to create a table with a masonry-like tiling, shifting each subsequent rank by half a cell.
I imagine this would be easier to do with CSS grid, because, as far as I know, table columns remain vertical.
I have tried this, though, and it works to some extent. But for reasons that I do not grasp yet it also changes the height of the ranks in a way that I could not control.
Using grid would probably help you avoid this problem too. With grid, you should be able to make one column or row diagonal, though I have not yet tried using grid with hexagonal boards. My CSS code for hexagonal boards uses absolute positioning, as grid was not yet part of CSS when I wrote the code. Anyway, absolute positioning is another alternative to using tables.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
I think the variable 'mln' gives you the current move number in the Post-Move sections.
It does not. I have made that mistake too and had to correct it. To use $mln
to get the move number, you need to get $mline[$mln]->movenum
. $mline is an array with a separate entry for each line of the movelist, but besides containing actual moves, it contains comments. $mln
is the index that a line has in this array, but when some lines are comments, it will go out of sync with the move number.
GAME Code has turn
, which will return $mline[$mln]->turn
, but it doesn't currently have anything returning $mline[$mln]->movenum
.
Is it possible for css to work with the horizontal or vertical hexagons shapes?
The Official Glinski Coordinates preset has CSS rendering which isn't working right for hexagonal games
The board image it was using had two separate elseif clauses dealing with it in a long series of elseif clauses in image_dimensions.php, and changes I was making to the second one had no effect. But when I noticed that it had two and combined them into one, I was able to set a value for $offy that worked for the board.
In other news, I'm told that the problem I was having with Thingiverse's editor has been patched up as of last Tuesday. I haven't tested it out yet; I probably will do so over the weekend.
290. Threeleaper. This piece is one that I had assumed was purely a problemist's piece (or a piece used only as part of a compound, such as the Frog) until I learned that it apparently is used in a version of Tamerlane. Said version isn't on this site, so I don't know how well it works in practice, but given that it can only reach about 11% of the squares on a board (at most) it's probably not impressive.
Its move is simple: it leaps three squares orthogonally. (H)
Like I say, it can have some value; just not a lot. (Still, I was surprised when I found that I hadn't already posted it.)
Such a straightforward piece deserves a straightforward model. (And of course you can easily imagine what the Fourleaper and Fiveleaper would look like!)
Since this comment is for a page that has not been published yet, you must be signed in to read it.
25 comments displayed
Permalink to the exact comments currently displayed.
Since this comment is for a page that has not been published yet, you must be signed in to read it.