01-31-2021, 11:02 AM
(This post was last modified: 01-31-2021, 11:40 AM by slimy_asparagus.)
I guess this one is for Matthew. I am officially stuck on both approaches.
First Approach
This approach uses Large Pieces and once placed they remain as large pieces. This hit the following difficulties:
1. The look of the pieces is not functional.
2. The hiddenness may be broken.
3. I can't work out how to indicate a hit on a ship.
The fundamental problem here is that I am trying to use the Large pieces in ways that are totally undefined. I am not surprised it ran into difficulties. I have no idea if this is an approach that the Ludii team will (or should) ever contemplate supporting.
Conversion Approach
The first approach works fine during the setup phase. The issue is that in the shooting phase I really want to treat the large pieces as a collection of ordinary pieces. If I can effect that change it should work perfectly. An example of my effort is here:
This compiles but no moves are allowed, no pieces are in the hand. I have tried playing around with it, but no enlightenment dawns.
One More Thing
In an effort to understand what is going on with the Conversion approach I tried to analyse using the new debug tools. I loaded the First Approach file and ran a game as indicated in the attached trial. Then I used the Test Ludeme Dialog to check the code (sites LargePiece at:X) for various values of X. The results I get are:
26: [3,26,27,28,29]
74: [8,74,94,114]
158: [10,158,159]
105: [7,105,106,107]
129: [9,109,129]
In all cases I don't understand why the bolded site is listed.
Conclusions
There is no promise in the documentation to think the First Approach should work. It would be reasonable to extend support for Large Pieces to make it work. However as far as I can see, the Conversion Approach should work with no additional support and I don't see why it doesn't.
First Approach
This approach uses Large Pieces and once placed they remain as large pieces. This hit the following difficulties:
1. The look of the pieces is not functional.
2. The hiddenness may be broken.
3. I can't work out how to indicate a hit on a ship.
The fundamental problem here is that I am trying to use the Large pieces in ways that are totally undefined. I am not surprised it ran into difficulties. I have no idea if this is an approach that the Ludii team will (or should) ever contemplate supporting.
Conversion Approach
The first approach works fine during the setup phase. The issue is that in the shooting phase I really want to treat the large pieces as a collection of ordinary pieces. If I can effect that change it should work perfectly. An example of my effort is here:
Code:
(piece "Carrier" Each)
(tile
"CarrierTemplate"
Each
{ { F F F F } { L F F F F } }
(move
(from if:(is In (from) (sites Hand Mover)))
(to (intersection (sites Mover "Defence") (sites Empty)))
(then
(do
(set Var "TileTo" (last To))
next:(do
(forEach
Site
(sites LargePiece at:(var "TileTo"))
(add
(piece (id "Carrier" Mover))
(to (var "TileTo"))
stack:True
)
)
next:(remove (var "TileTo") level:0)
)
)
)
)
)
One More Thing
In an effort to understand what is going on with the Conversion approach I tried to analyse using the new debug tools. I loaded the First Approach file and ran a game as indicated in the attached trial. Then I used the Test Ludeme Dialog to check the code (sites LargePiece at:X) for various values of X. The results I get are:
26: [3,26,27,28,29]
74: [8,74,94,114]
158: [10,158,159]
105: [7,105,106,107]
129: [9,109,129]
In all cases I don't understand why the bolded site is listed.
Conclusions
There is no promise in the documentation to think the First Approach should work. It would be reasonable to extend support for Large Pieces to make it work. However as far as I can see, the Conversion Approach should work with no additional support and I don't see why it doesn't.