Algorithms and Programming Class Project

Objective
Make a Memorama game with the knowledge acquired throughout the school year, programming it with GAMBAS which will allow a broad demonstration of the student’s abilities. A mix of all the acquired knowledge and a way of showing how programming can be used for practical purposes.
Problem Statement
The number of players is requested, starting with player 1, then 2 and so on until the last player. Each player has two card selections per turn. If the cards match, the player scores a pair and plays again; otherwise the turn passes to the next player. Matched cards leave play. The game ends when every pair is found. The highest pair count wins; this project’s tie rule awards the win to the player who first reached that score.
A little bit of the code:
Public Sub Form_Open()
Dim num As Byte
num = Jugadores.numjugadores
Print num
If num > 1 Then
label1.visible = True
label2.visible = True
textbox1.visible = True
textbox2.visible = True
Endif
If num > 2 Then
label3.visible = True
textbox3.visible = True
Endif
If num > 3 Then
label4.visible = True
textbox4.visible = True
Endif
If num > 4 Then
label5.visible = True
textbox5.visible = True
Endif
If num > 5 Then
label6.visible = True
textbox6.visible = True
Endif
End
Testing and Real-World Use
This could be tested by tracing matching pairs, repeated clicks, turn changes and the final score against the game rules. The same state-based design is useful for turn-based games and interfaces that permit actions only in a defined order.
Game Screens
Start Screen

Player Screen

Game Screen #1

Game Screen #2

End Screen

Winner Screen

Conclusions
A video game is a set of algorithms that when used simultaneously generates fun for the user. The conditions, cycles and each of the arguments that are part of it give it a little more emotion. Hundreds of different programs and games can be achieved, with different combinations. Throughout the school year, the use and management of a logical structure was learned, and it was applied through GAMBAS programming language.