robocupjunioraustralia/soccersim

Match setup modal functionality

Closed this issue · 0 comments

The setup modal (see #32) is is a modal that deals with setting up the initial competition between two robots.

[] Load file buttons store the robot code temporarily in a location (Would be good if it automatically detects if XML/JS)
[] Robot type buttons are set by us based on whether the code mentions motorC
[] Kickoff Robot (robot 1 or robot 2) sets which robot is the kickoff robot, and which is the goalie
[] Kickoff team button forces a particular team to kick off
[] Coin flip sets a random team to start as the kickoff team

All these details must be stored somewhere (probably in some Competition class).

On click of a submit button at the bottom of the modal:

  1. If only one code is submitted for a team, allow only one robot to spawn in (e.g. a checkbox)
  2. Colour is assigned to robots
  3. Saving the modal will trigger updates to the robots. Store robots and codes somewhere accessible, or such that we can call intptr functions