Game: Dominoes Boneyard - Grab some bones and get ready for the definitive dominoes experience!
Please read the Discussion Board Rules before participating in the discussion boards.
Post a new comment                         Back to Dominoes Boneyard                         Show all boards                         Subscribe Subscribe

(#5552890) Re: selecting bone in boneyard
Posted by hypnotist on 15 Nov 2023 at 9:11AM
In Mexican Train if for no other dominoes variant your next bone is predetermined as evidenced by the game immediately returning to your game sheet ready for your next move after you save your move if your opponent is unable to play, & your opponent's draw from the boneyard doesn't allow for a move either.

Having established that detail it makes no sense that different variations should be programmed differently unless the difference in rules between the variants requires different internal workings. In Mexican Train no more than one bone is drawn in a turn whereas in other variants you carry on drawing until you either draw a bone that can be played or the boneyard is empty, but that will be controlled by the sections of code that invoke the section of code that does the actual drawing of one bone at a time then returns the result to the calling routine (or, in lay terminology, reports back what the result of the draw action is. In Mexican Train the calling routine will simply accept the new bone & add it to the player's rack before checking if can be played & if so allowing the play to be made before allowing the move to be saved. If it can't be played then the routine which controls the play is skipped & it goes directly to the Save routine. The point is that it makes no sense to code separate routines for each variant, it is much simpler to have a common routine which serves all variants. Therefore what is true for Mexican Train should also hold true for the other variants too, & this is confirmed by drawing a bone when necessary in another variant then, instead of saving the move, undo the move & start the move over again: you will find that however hard you try to draw a different bone you always get the same one every time you draw a bone—conclusion: even though at the beginning of your move your hand is displayed without the bone that you will get when you draw a bone, that bone is already predetermined when you open the game to make your move & you can't change it by repeated drawing of a bone or accessing the specific game by different menu routes or changing the sequence in which you play your games.
div>Replies to this message:
SubjectPosted ByDate & Time
5553368Re: selecting bone in boneyard Jools17 Nov 2023 6:28AM
5552951Re: selecting bone in boneyard foster00715 Nov 2023 2:01PM
5552890Re: selecting bone in boneyard hypnotist15 Nov 2023 9:11AM

Post a new comment                         Back to Dominoes Boneyard                         Show all boards                         Subscribe Subscribe