GUI - nofaryos/OPP_Ex2 GitHub Wiki

In the second part of the project we created a graphical interface that shows the course of the game visually. Running the game according to a JAR file first opens a window where you can enter an ID number and a stage number and after receiving the data a window will open where the game will start adjusting the received stage, with a number of agents and Pokemon.

In order to realize the creation of the graphical interface, we used several classes:

1.MyFrame - A class that creates the frame for the game board and contains a MyPanel variable.

  1. MyPanel - In this class we do all the game drawing, this class contains functions that draw the ribs, the node and add characters to the agents and Pokemon. In addition this class contains adding a background to the game window, and displays the time left for the game.

3.openScreen- This class creates the login window, which contains an ID entry box, and a step number. In addition this class contains a background image for the login screen. In this class we implement the ActionListener where we add the text windows to get an ID and step number and the function listens at the click of a button thus opening the game window.

The entrance screen contains ID entry boxes and a level where you want to play:

A window showing the game board, left the timer and right the agent value. In addition, throughout the game you will see what the value of each Pokédor is: