Controls

Create a group to handle the controls for the game

At the moment our game will destroy the element if it is over the trash can.

It does NOTHING if it is placed anywhere else.

We will now write a function to update the element once it is dropped.

Concept:

The player drags an element and drops it on the game board

Now we must:

Player drops Earth and Fire

We create an invisible purple square called the "Reader" at the overlap position

If the two elements fall within the boundary of the square and they can merge

We destroy the elements and spawn a new element (lava) at their position.

We have to check all the possible matches!

Add a new function to our functions group called ReadPosition

Once we have checked the merge and spawned the new element we can destroy the reader.

Now we must update our Controls Group Code

Now test the game and check that merges work