Skip to content

Explorer Interaction

Nicola edited this page Dec 7, 2025 · 12 revisions

The interaction between the planet and Explorers is regulated by the common protocol. The Explorers' messages are handled by the planet as follows:

Note: The code can be found inside the explorer module.

  • SupportedResourceRequest: sends the list of supported resources to generate, which is of type HashSet<BasicResourceType>. The list contains only one resource, since our Planet is of type C
  • SupportedCombinationRequest : sends the list of supported resources to combine, which is of type HashSet<ComplexResourceType>
  • AvailableEnergyCellRequest : sends 1 if the EnergyCell of the planet is full, 0 otherwise. Cannot be more than 1 since our Planet is of type C
  • GenerateResourceRequest : sends the requested resource if the Planet AI decides to fulfil the request and the EnergyCell is full, otherwise sends None
  • ComplexResourceRequest : sends the requested complex resource if the Planet AI decides to fulfil the request and the EnergyCell is full, otherwise sends back an error with a String and the two basic resources sent by the explorer.

The behavior of GenerateResourceRequest and CombineResourceRequest depends on the configuration of the Planet AI, for more informations refer to Ai Overview

Clone this wiki locally