Coding - part B

Now we want to add the code that will give the conditions to show the final feedback or message. Let's say our message is Well done! 1) Using GGB tools insert the text you want to appear once your puzzle is done. In this case we type Well done! ( you can change color, size, etc...) 2) Make sure that you drag the "away piece" to its final position. OR Redefine the Point from the "away piece" with the final coordinate. 3) In settings (over the text) select tab Advanced ---> Conditions to show the object then type: P_1 ≟ (0, 2) ∧ P_2 ≟ (1, 2) ∧ P_3 ≟ (2, 2) ∧ P_4 ≟ (0, 1) ∧ P_5 ≟ (1, 1) ∧ P_6 ≟ (2, 1) ∧ P_7 ≟ (0, 0) ∧ P_8 ≟ (1, 0) Apply condition to show the "away piece". Same condition used for the text. (above) OBS.: Make sure that you press ENTER after each input.
Image
You can check if your button is working by dragging away any piece (in this case the message should disappear). In the image below, you can see an alternative way of coding the conditional.
Image