States and capitals

Arrojeria, Eustakio

Elhuyar Zientziaren Komunikazioa

Lizaso, Pili

Informatika Saila

Elhuyar Fundazioa

The theme chosen to work on this programme was geography, specifically States and European capitals. However, we want to give more importance to the way we work than to the topic itself, since, as in most cases, the same program can be useful to address issues from many other areas.

Once in one column the states appear and in the other the capitals, what the user will have to do is find the relationship between these two columns, or in other words, form unitary pairs.

The screen displays the keys that can be used at all times and their functions. So if you're willing to start working, go ahead!

(Note: To see the image go to pdf).

Program description

To begin with the explanation of the program, in this case we found it interesting to indicate which tables are used and what they are used for.

  • TAU$ (9.4): It will store the data of the 9 states that will appear on screen. The statue of TAU$ (I,1) will be preserved, the state capital of TAU$ (I,2), TAU$ (I,3) will indicate whether it has already been invented (1) or not (Ø) that pair and the color corresponding to the component TAU$ (I,4).
  • EST (31): In this table the numbers from 1 to 31 will be saved, as there are 31 states to choose from.
  • UD (9): This table will store 9 selected numbers from the EST table.
  • PFC (9): Numbers 1 to 9 will be saved.
  • NAH (9): It will be used to mix the numbers from the table above. That is, NAH (I) will indicate in the left column the position that will occupy the state capital in position I in the right column.

Let's analyze the program:

  • 10-60: Program initialization.
  • 70-120: 9 of the 31 states will be taken randomly.
  • 130-190: A color per state/capital pair will be defined and the number of votes in which the capital will appear in the right-hand column.
  • 200-250: Only the selected data is read.
  • 260-330: The home screen is displayed. States are mixed in the left column and capitals in the right, all with the same color.
  • 350-760: While not all of them correct and do not make 5 errors, the user must first select one of the columns on the left. To do this, you can use the Ø keys, which once positioned in the <RETURN> element selected you must press <RETURN>. (370-550) Once elected the State will automatically move to the right column, to the capital column and here you <RETURN> <RETURN> will have to do the same. (560-600)If the
    choice has been correct, they will be distinguished by the color of the couple, both the state and the capital. (620-640). If not successful, they will remain in the same color and, unless it has been the 5th error, it will offer the possibility of a new session (650-750).
  • 780-910: The game will end because all couples have been found or 5 mistakes have been made before finding them. In the second case it is possible to see the result. (820-860).
  • 940-1070: Home screen, i.e. combos, etc. this is the subroutine with which it is represented.
  • 1090-1120: Subroutine to write individual characters and sound.
  • 1140-1170: Subroutine to write character strings from right to left.
  • 1190-1240: Main program data, States and capitals.
  • 1260-1310: Codes and data used to make the home screen.
Babesleak
Eusko Jaurlaritzako Industria, Merkataritza eta Turismo Saila