*4.2.3 dApp - inspector*

The inspector must check at each completed turn whether a team has won the game or whether it has come to a draw. In doing so, he must examine the entire board for the previously defined victory conditions. As soon as there is a sequence of four game tokens from the same team on the board, the team has won the game.

To realize this requirement, the entire board is split into a multidimensional array (seven rows, six columns). This array is then traversed with two nested FOLD functions, and it is checked on a horizontal, vertical, and diagonal levels whether a team has won or whether there is a draw. For this purpose, each of these conditions is checked using index queries. By using index queries, the need for an algorithm that is entirely based on loops is eliminated and, thus, can be implemented in Ride.
