Its like bejeweled\candy crush. You select two or more adjacent colors to perform an "attack".
The "attack" will be one of four choices: You attack, you attack with magic, the enemy attacks you, the enemy attacks you with magic.
So the optimal solution is: Maximize the attacks that benefit you while also picking attacks that either lessen the damage you take OR choose damage against you that set you up for bigger patterns on the next turns.
edit: looks like is can get deeper too. For example, bats have no mana and cannot attack with magic so it is a nice way to move some blocks without taking damage if you dont have any moves.
The "attack" will be one of four choices: You attack, you attack with magic, the enemy attacks you, the enemy attacks you with magic.
So the optimal solution is: Maximize the attacks that benefit you while also picking attacks that either lessen the damage you take OR choose damage against you that set you up for bigger patterns on the next turns.
edit: looks like is can get deeper too. For example, bats have no mana and cannot attack with magic so it is a nice way to move some blocks without taking damage if you dont have any moves.