Skip to content

Help for Developers

SaskiaJacob edited this page Sep 10, 2018 · 6 revisions

On this page, you can find some background information about how this app is implemented.

Important classes

  • Element: This class extends the "android.support.v7.widget.AppCompatButton" class and represents a box on the game field. These elements contains different feateres like the presented value (number) and the position of this value in the playing field. (posX, posY). Because of the animation a distinction is made between the calculated value and the displayed value. Furthermore there are more feateres like the color of the box and the font size of the value.

  • GameState: This class represent the gamestate for the different modi of the game, which implements the java.io.Serializable. Because of this, the gamestate can be saved via streams. The gamestate contains the last numbers on the game field, as well as the previous gamestate, which can be reached with the undo button in the game. Furthermore there is a variable undo, which define, if it is possible to execut a undo.

  • Gestures: This class handels the recognition of the user input. Therefore a mesurement of the touch input is made. With this information an interpretation of the movement is executed to define in wich direction the user wants the boxes to move in the game field (left, right, up, down).

  • GameStatistics: The current statistic in each modi is defined in this class. It contains the highes reached number, the amount of swipes (total and for each direction), playing time, highes score and the amount of used undo button. For saving this data in a file, the interface java.io.Serializable is implemented.

Activities

  • BaseActivity: This acitivity is a basic function if the SECUSO app. For example the menu navigation and the navigation bar are implemented in this class. All other activity succeed from this class.

  • BaseActivityWithoutNavBar: The same function are implemented as in the BaseActivity, but without the navigation bar.

  • MainActivity

  • GameActivity

  • StatsActivity

  • SettingsActivity

  • SplashActivity

  • HelpActivity

  • AboutActivity

  • TutorialActivity

Dependencies

Image caching library. Used for loading a Bitmap image inside the Activities MainActivity, StatsActivity and TutorialActivity (This is done to prevent a drawing cache error as a result of a too large size.)

Clone this wiki locally