Comments/Ratings for a Single Item
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.
The Official Glinski Coordinates preset has CSS rendering which isn't working right for hexagonal games
Note that I recently changed the behavior of where
to return false when a coordinate does not exist. This seemed to make more sense than returning a lone rank or file label, as it sometimes would for a non-existent space. But I guess these lone rank or file labels were less problematic for some code.
There was a similar problem with the King, and I fixed both. The problem was with the functions for ascertaining the range of the piece, which were used only for potential moves. When I tried to make moves, they worked, and what I needed to fix were the NL, nL, KL, and kL functions. Here is an example of what was no longer working:
def NL array where #0 1 2 where #0 2 1 where #0 -1 -2 where #0 -2 -1 where #0 1 -3 where #0 -1 3 where #0 -3 1 where #0 3 -1 where #0 2 -3 where #0 -2 3 where #0 -3 2 where #0 3 -2;
I believe the problem arose if any of these where
clauses returned false instead of a coordinate. To get around that, I replaced the code with this:
def NL aggregate lambda (where #frm #0 #1) ((1 2) (2 1) (-1 -2) (-2 -1) (1 -3) (-1 3) (-3 1) (3 -1) (2 -3) (-2 3) (-3 2) (3 -2)) =frm;
This uses the aggregate function to build an array of non-empty values of the lambda function, and it passes it the same set of values as the previous code did. So, whenever the where
function returns false, it doesn't get added to the array.
I've just noticed that in the rule enforcing preset for Glinski's chess, several valid knight leaps are not marked as legal from the initial position.
That's now fixed too. When displaying the board from Black's perspective, the CSS uses right and top instead of left and bottom, but I had pasted some code using left and bottom.
It's now displaying correctly, though it isn't switching the display properly when it is Black's turn.
It will display properly if you change the rendering method to GIF, JPG, or PNG. I'll look into why the CSS method is not getting the same results.
The preset reached through the Official Glinski Coordinates button here is not displaying properly
10 comments displayed
Permalink to the exact comments currently displayed.
Is it possible for css to work with the horizontal or vertical hexagons shapes?