It might seem quite difficult to understand how Microgaming creates applications of the online casino for iOS, but when each step is thoroughly explained, the picture becomes much clearer.
Of course, apps contain a wide choice of functions, screen views, game outcomes and etc. So in this article, we will provide you with a detailed manual on how the determination of the winner happens.

The main principle of this function is to add a score to a player based on the outcome of the appeared card (if one turns out bigger than another, then a gambler gets some points).

## IF

To set up a function that can help to determine the winning card, this operation should know how to consider different results. For this, it’s essential to use if statements in coding. When adding “If” there is an opportunity to set special conditions that if they are true, the program does one thing, if not, – another.

Microgaming iPhone casinos and other gaming apps use this method to create the predetermined reactions to certain outcomes.

When working with Xcode, the look of the line with “if” should be like this:

If a>b {
} (executing a code line, in case the above statement is true).

There is also an opportunity to set two or more conditions in order to activate the next line. In this regard, it is necessary to add some signs:
If a>b && b } (code)

Read it this way: If “a” is bigger than “b” and “b” is less than “z” then do (set up limitations for the correct work of the application).
When you need to pick any of two conditions to satisfy the code, just replace “&&” (and) with “||” (or). And to show that some value is equal to another use ”==”.

Find out the example:

## ELSE IF

Also, there is an extra rule that you can add between the “if-else” frame. “Else if” allows to put a new requirement that would work in case the previous one is false. It is effective for creating sophisticated gaming systems that have more than one or two outcomes.

## ELSE

Close the frame with “else” after what the last condition would take place. The app will count this line only when all of the above will be false.

## Score Counting in Microgaming Card Games

One of the main things in the Microgaming Card Games is score counting. So if, for example, the application has two shoes of playing items (right and left), at each round the game can reveal you one card from each box. The highest value will bring 1 point. So the score of the one or another shoe (left or right) will be increased after every turn.

### Score Labels in Code

Firstly, for implementing the function of score counting, we need to set labels in the code. There should be “rightScoreLabel” and left one.
To make both of them empty at first we need to assign 0 value. For this, write:
var rightScore = 0
var leftScore = 0

### Designating Conditions and Microgaming Card Game

So then at this stage, we need to put conditions for creating first rules of the Microgaming card game.
Let’s present it this way:

If leftNumber > rightNumber {
//adding 1 point to left side
leftScore += 1
}
else if leftNumber = rightNumber {
// nothing happens
}
else rightNumber > leftNumber {
//adding 1 point to right side
rightScore += 1
}
The game will compare two cards and then assign 1 point to the one with the higher value. To connect certain playing items with certain values just put them in the right order. For example, in the line “let Cardnames = []” place the ace at the end of the sequence to assign it as the highest card.