Our overall gameplay was handled by two services: Control and Sync. Control service handles all user-inputs, such as key-presses into the terminal or forced-action button presses. During initialization, the user must select a station and enter the submarine's initial position. During gameplay, the user can enter an action at the start of every turn. Sync service handles everything related to timing. This includes dynamically syncing to the other teams/stations, activating/deactivating push-to-talk, and posting to transmit service when it's time to transmit. Sync service also handles responding to other team's actions, such as transmitting RIP messages when hit by a missile.
Our software is able to receive and transmit 13-dibit messages, as outlined by the Communications Protocol. Receive service parses all 26 bits, formats the most important information within a 16-bit event parameter, and posts the event to the relevant service (i.e. Control, Conn, Sonar, or Torpedo). Transmit service receives an event from Sync service and converts that event into a 13-dibit transmission. Servo service is called by Sync service to send the transmission by enabling/disabling push-to-talk on Mumble.
Each team has three stations as outlined by the project specification: CONN, SONAR, and TORPEDO. CONN service handles navigation, responds to enemy pings, and checks if we are hit by an enemy's missile. SONAR service tracks enemies locations by sending pings, listening for echos, and recording missile launches. TORPEDO service launches and detonates missiles.