Probléme de mélange dans un pulzze

Your upload did not complete.
Try again.

TAQUIN.aia (1.2 MB)
vous voulez dire celui du fichier ?

Got it.

Here are your cleaned up blocks image, for the board users on their phones:

I immediately notice that you followed good naming conventions on your Media files, making it possible to avoid having to list all the image file names in blocks.

Reviewing your shuffle code ...

Here is your shuffle code ...


You add an extra item 'vide' at the top (item 1) of the shuffled list.

What does that do to help you?

After shuffling, you call the second procedure, which looks for the 'vide' in item 1 and then immediately decides when it sees it that it should not use the rest of the list.

Here is our Lists FAQ, with some very nice shuffle procedures.

je ne me sert pas de ce bloc "shuffleliste" désolé c'est un ancien bloc que j'ai oublié d'effacer. J'utilise le bloc procédure "melangerSolvable" pour avoir un mélange qui résolu toujours le puzzle.

I recommend reading and trying this Filipino Phonics sample from another thread.

It has sample code for collecting media file names into a list for smart code to collect the files by their name patterns, and avoid having to list the file names in lists of text blocks.

je ne pense pas que cela concerne mon cas car se sont des images et non des fichiers multimédias ?

It has general ideas of grabbing the list of Media file names and filtering the list to match whatever you need at the moment. It can filter for '.jpg' or '.png' instead of '.mp3' just by changing a text block.

You have machinery available to you to reduce the drudgery of developing an app.
It's worth a moment to learn how to use it.

Here is the world's easiest shuffle value procedure:

I downloaded images of your shuffle code, for the board ...

Is this a memory matching game?
We have samples of those.

I see you loading global list Grille from one of these pre-loaded lists of image files:





(A good coder could have generated those file names in a loop at run time using a counter and text JOIN blocks, given the name cafe/eau/tracteur/....)

None of these have an item 'vide' in them.

But your shuffle code looks for 'vide in them.

Why?

image

What's the game play here?

Is this a slide 15 game, with a missing block?

How do the 4 images above the 16 buttons relate to each other?

le gameplay : je clique sur une image qui se trouve en haut, cette image apparait dans la grande grille (4x4) , je clique sur le bouton "mélanger" et les cases de l'image se mélange, la première case doit rester libre pour pouvoir déplacer les cases. Quand l'image est mélanger , on doit reconstituer l'image de départ en déplaçant les cases (le déplacement des cases se fait en cliquant sur le bouton de la case que l'on veut déplacer ).
Est ce que ma description est plus précise ?

So the 16 images get assigned randomly into the 16 buttons, but all of them except 1 are obscured by a foreground color at any time.

The image distribution remains unchanged as you click the 16 buttons, only the color exposure changes button by button.

The game remembers which of the 4 target images you are seeking, and watches to see if you expose it?

J'ai coupé l'image du puzzle en 16 morceaux images (et la première et vide) , au début mon puzzle s'affiche avec l'image que l'on sélectionne , il faut cliquer sur le bouton "mélanger" pour mélanger les cases.
Oui le jeux se souvient de laquelle des 4 images cibles vous recherchez

Instead of doing this manually and uploading 16 images, you could do this programmatically using the image extension and its CreateChunks method

Taifun

This gets tricky.

This is like the slider 15 puzzle,Fifteen Puzzle Game a 4 by 4 grid of numbered tiles 1-15 and a hole, that you have to get into the proper order by sliding one at a time into the adjacent hole.

Shuffling such a puzzle only works half the time, because half of the shuffle results would be impossible to solve without lifting two pieces from the frame and swapping them instead of sliding them.

https://www.google.com/search?q=impossible+sliding+15+puzzle

Please confirm, this is a sliding puzzle?

Also, if it is, where does the empty slot go,

  • lower right, or
  • upper left

when the puzzle is solved?

Here is some code to find out if it is solvable or not... as App Inventor is a bit slow in doing calculations this might make sense to do in an extension or using Javascript...

Taifun
.

I tried running your app as is, in the Companion.

Initially, an error message popped up about being unable to find one of your very long named images

image

(I forget which one.)

Since they look unessential to the game play, I figured they were background images, and I set the Screen1 background image to none.

That cleared the error for me.

I was subsequently able to bring up your 4 images and shuffle them

Sample run:

Sample run

I noticed during initial game play that I got false positive success messages, perhaps from a Clock Timer?

But the shuffle you had looked okay to me.

P.S. Your images are adorable.

I found where you check for puzzle completion.


You are using the green = block to check if two lists are equal.

I double checked the tool tip for the green = to see what it said about comparing two lists.
It didn't mention anything, only text and numbers.

So I will try comparing the CSV (Comma Separated Values) texts of those two lists instead.

The new blocks:

and the sample run, including shuffle ...
Sample run 2
(I didn't bother trying to complete this one.)

It cleared up the messages during the shuffle.

So, the only thing I ended up touching in your app was the list comparison test, where I switched it to comparing the text CSV rows of the two lists.

My blocks in the prior post are draggable.