# Spectral Analysis of Electroencephalographic Data in Serious Games
## 2 Anatomy of Serious Game Development
### Serious Game Description  
In this study, we thoroughly describe the design and development stages of an SG for cognitive training. The design and development of the SG was focused on the students' cognitive training in the field of choosing basic logic gates. In the work of [57; 58], the authors explained the following logic gates, which were used in the SG:* AND: This gate is called a logical product. This logic gate works as follows: 0 is false and 1 is true. The output is 1 (or true) when both inputs are 1, otherwise the output is 0 (or false). The mathematical notation is Y = A \(\times\) B. * OR: This logic gate is called a logical sum. This logic gate works as follow: The output is true if either input or both inputs are true. If both inputs are false, the output is false. The mathematical notation is Y = A + B. * XOR: The exclusive-OR (XOR) gate acts in the same way as the logic either/or. The output is true if either, but not both, of the inputs are true. Another way of looking at this circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same. * NOT: A logical inverter, sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state. If the input is 1, then the output is 0. If the input is 0, then the output is 1. Cognitive training of logical thinking is realized through logical puzzles, which are placed in different rooms and places in the virtual world of the SG. To avoid the game becoming monotonous or boring, we tried to design and develop an historical magical virtual environment. The attractiveness of the design should help maintain the player's attention. The puzzles in the game have principles based on chosen logic circuits. These circuits work on the principles of Boolean algebra. The main task of this 3D SG is to configure the inputs of the circuit so that an imaginary flow occurs through the entire circuit up to the circuit's outputs. The player can advance to the next level when the puzzle is solved correctly. In the SG, logical characters are represented by the following objects:  
* Cube: this is the only object in the SG that the player can directly manipulate. In combination with the \"Power Generator\" (PG) object, together they form a switch that controls whether or not an imaginary electric current flows through a circuit. If the cube is on the PG, electric current enters the circuit; if the cube is outside the PG, no electric current passes through the circuit. * Logic gates: there are four types of logic gates--namely, and, or, not, and xor. Each logical gateway has one output and two inputs. * Power generator: represents the input to the circuit. There are up to six types of power generators in the SG as well as the cubes and each has a different color. Several cubes and power generators are used to make the individual circuits cohesive, i.e., there are several logical circuits separated from each other in each level meaning the player cannot use the cube for a red circuit as an input for a different circuit, for example a blue circuit. This means the color of the cube and power generator must always match. * Cable: representation of the electric current flowing through the logic circuit. When the electric current is flowing, the cable glows with the color of the logic circuit. * Door: the entrance to the next level of the SG. The door will not open until all logic circuits in the level have been correctly resolved. The SG was divided into three levels. Each of them represented a particular difficulty level: easy, medium, and hard. The first level, \"The Garden,\" is an introductory level to the game. This level is situated outside, in the garden. The player gets acquainted with the controls of the game's character as well as the mechanics of the SG. At the beginning of this level, the first puzzle is introduced to the player, which acquaints them with the possibility of interaction between the cube and the PG (designed for placement of the cube).