*4.2.1 dApp - main*

Since there is no way to perform event- or time-based actions on a blockchain, a mechanism had to be developed to determine if a team had exceeded the maximum allowed round duration.

To do this, each transaction, regardless of which team it came from, was checked to see if the team currently taking its turn had taken longer than the current block height + 5 blocks (1 minute per block). If this is the case, the current team's turn will automatically end as soon as a player from the other team makes a new transaction. The user interface calculates these values in real time and automatically indicates to the waiting team that it may now vote again if the other team timed out.

#### *4.2.2 dApp - voting*

The Voting dApp must calculate how many times a single field has been voted for each players submitted vote. This is problematic because Ride does not implement a native counting function.

First, all votes are collected in a single entry in the data store with the following format: "walletId\_fieldNumber, walletId\_fieldNumber." After all players have voted, the previously generated entry is split by the delimiters "," and "\_" into a new list containing only the voted field numbers. Up to this point, it has not been necessary to use a loop, since Ride provides native functions for splitting strings. Since the new list can only be as large as the number of players, the FOLD function can be used to determine which field got the most votes. This value is returned to the Main dApp after the calculation.
