MEMORAMA THE GAME

Algorithms and Programming Class Project

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 2 movements per turn, if the player turns over 2 even cards, then the player has another turn, his score increases and these cards leave the game, if the cards are different, it’s the next player’s turn. The game will continue until all cards have been eliminated with their pairs. The player with the highest number of pairs revealed is the winner. In the event of a tie, the winner is the first to obtain the maximum score. There are secrets in the game that must be discovered.

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

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.