Skip to content

Game Action

Janina Krueger edited this page Jul 28, 2022 · 12 revisions

Action Selection Menu (#63, #92)

Action dialog using Rflutter alert. The popup contains actions depending on the state of the game (attack or defense). It is triggered when the user clicks on a point in the game field. If the field is set to the goal that does not belong to the user's team attack actions are suggested but if the home field can be seen defensive actions are suggested(see parameters). In the case that an offensive action is performed from the defensive side of the game the user can swipe in the action menu to select the respective other set of actions.

Attack actions grafik

Defense actions grafik

Goalkeeper Actions (Issue #218)
Bildschirmfoto_von_2022-06-26_16-45-50

  • action_menu.dart

    • Function determineActionType: returns a String with the action type, which will be also saved in the db together with the action. Possibilities are: - otherGoalKeeper: If the click was inside the goal of the others, nothing will happen and no action menu opens. - goalKeeper: Goalkeeper Menu opens. - attack: Attack menu opens which is swipeable to defense menu. - defense: Defense menu opens which is swipeable to attack menu.
  • Goalkeeper Menu.

    • On goals of the others and parades, the field side switches automatically, See Automatic Switch to other field side
    • No player menu will open, it is searched automatically for the player with position "TW". This player will be assigned to the action.

Logic

TODO Actions are only stored after a player was selected

Clone this wiki locally