pseudocode for HZV state machine { state: waiting for controller if the balloon is popped move to a zombie wait for controller state check if a new packet has arrived if handshaking send a response move to waiting for commands set a timer state: waiting for a command check if a new packet has arrived if a command execute the commands send an acknowledgment check if one second timer is up if so go back to waiting for a command if the balloon is popped move to a zombie wait for controller state state zombie wait for controller: receive necromancer data (rest same as regular) state: zombie waiting for a command receive necromancer data use necromancer data on new commands (rest same as regular) }