you could define a variable, that's the number of diamonds. You'll have to check this number everytime a player makes a move. So, everytime a player makes a move, a function to check the number of diamonds will be called like so:
var diamondsNumber: int;
function CheckNumberOfDiamonds(){
if (diamondsNumber==0){
//show the "game over" panel
}
↧