Differences

This shows you the differences between two versions of the page.

Link to this comparison view

poo-ca-cd:teme:2025:8e211bfe-f6eb-467c-9e54-f8e6df4c1535:tema-1 [2025/10/03 21:23]
ioana.tudorache2507
poo-ca-cd:teme:2025:8e211bfe-f6eb-467c-9e54-f8e6df4c1535:tema-1 [2025/10/04 03:42] (current)
ioana.tudorache2507 [printMap]
Line 51: Line 51:
  
   - __Mediul evoluează automat__ – fenomene naturale care se petrec fără intervenția robotului   - __Mediul evoluează automat__ – fenomene naturale care se petrec fără intervenția robotului
 +     * calitatea aerului, a solului și a apei se modifică în timp (în aceasta ordine)
      * plantele își schimbă starea (pot crește și se pot ofili)      * plantele își schimbă starea (pot crește și se pot ofili)
      * animalele se deplasează și își schimbă starea (consumă plante sau apă ca să nu fie flămânde)      * animalele se deplasează și își schimbă starea (consumă plante sau apă ca să nu fie flămânde)
-     * calitatea aerului, a apei și a solului se modifică în timp 
   - __TerraBot ia decizii și acționează__ – sub controlul comenzilor primite:   - __TerraBot ia decizii și acționează__ – sub controlul comenzilor primite:
     * se deplasează pe hartă     * se deplasează pe hartă
Line 90: Line 90:
   *  Fiecare celulă a hărții poate conține **maximum o plantă, un animal și o sursă de apă**.   *  Fiecare celulă a hărții poate conține **maximum o plantă, un animal și o sursă de apă**.
 </​note>​ </​note>​
 +
 +===== Entități =====
 +
 +==== Plant ====
 +
 +==== Animal ====
 +
 +==== Water ====
 +
 +==== Soil ====
 +
 +==== Air ====
  
  
 ===== Comenzi ===== ===== Comenzi =====
 +
 +==== Comenzi pentru simulare ====
 +
 +=== startSimulation ===
 +
 +  * marcheaza inceperea unei simulari
 +  * robotul porneste **mereu** de pe **pozitia [0, 0] a hartii**
 +
 +
 +Mesaje posibile pentru aceasta comanda:
 +
 +  * ''​%%"​Simulation has started."​%%''​
 +  * ''​%%"​ERROR:​ Simulation already started. Cannot perform action"​%%''​
 +
 +== Input ==
 +
 +<spoiler Click pentru input startSimulation>​
 +<code json>
 +{
 +    "​command":​ "​startSimulation",​
 +    "​timestamp":​ 1
 +}
 +</​code>​
 +</​spoiler>​
 +
 +== Output ==
 +
 +<spoiler Click pentru output startSimulation>​
 +<code json>
 +{
 +    "​command":​ "​startSimulation",​
 +    "​message":​ "​Simulation has started.",​
 +    "​timestamp":​ 1
 +}
 +</​code>​
 +</​spoiler>​
 +
 +\\
 +
 +=== endSimulation===
 +
 +  * marcheaza sfarsitul unei simulari
 +
 +
 +Mesaje posibile pentru aceasta comanda:
 +
 +  * ''​%%"​Simulation has ended."​%%''​
 +  * ''​%%"​ERROR:​ Simulation not started. Cannot perform action"​%%''​
 +
 +== Input ==
 +
 +<spoiler Click pentru input startSimulation>​
 +<code json>
 +{
 +    "​command":​ "​endSimulation",​
 +    "​timestamp":​ 10
 +}
 +</​code>​
 +</​spoiler>​
 +
 +== Output ==
 +
 +<spoiler Click pentru output startSimulation>​
 +<code json>
 +{
 +    "​command":​ "​endSimulation",​
 +    "​message":​ "​Simulation has ended.",​
 +    "​timestamp":​ 10
 +}
 +</​code>​
 +</​spoiler>​
 +
 +\\
 +==== Comenzi pentru mediu ====
 +
 +
 +=== changeWeatherConditions===
 +
 +  * marcheaza un fenomen meteo care produce schimbari pentru aer
 +  * Valorile posibile pentru tipul de schimbare meteo:
 +     * desertStorm ->  desert air
 +     * peopleHiking -> mountain air
 +     * newSeason -> temp air
 +     * polarStorm -> polar air
 +     * rainfall -> tropical air
 +
 +<note important>​Schimbarea meteo se ia in considerare **DOAR** pentru celulele ce au acel tip de aer</​note>​
 +
 +Mesaje posibile pentru aceasta comanda:
 +
 +  * ''​%%"​The weather has changed."​%%''​
 +  * ''​%%"​ERROR:​ The weather change does not affect the environment. Cannot perform action"​%%''​
 +  * ''​%%"​ERROR:​ Simulation not started. Cannot perform action"​%%''​
 +
 +== Input ==
 +
 +<spoiler Click pentru input changeWeatherConditions>​
 +<code json>
 +{
 +    "​command":​ "​changeWeatherConditions",​
 +    "​type":​ "​desertStorm",​
 +    "​windSpeed":​ 25.0,
 +    "​timestamp":​ 10
 +},
 +{
 +    "​command":​ "​changeWeatherConditions",​
 +    "​type":​ "​rainfall",​
 +    "​rainfall":​ 12.5,
 +    "​timestamp":​ 11
 +},
 +{
 +    "​command":​ "​changeWeatherConditions",​
 +    "​type":​ "​peopleHiking",​
 +    "​numberOfHikers":​ 40,
 +    "​timestamp":​ 12
 +}
 +</​code>​
 +</​spoiler>​
 +
 +== Output ==
 +
 +<spoiler Click pentru output changeWeatherConditions>​
 +<code json>
 +{
 +    "​command":​ "​changeWeatherConditions",​
 +    "​message":​ "The weather has changed.",​
 +    "​timestamp":​ 10
 +},
 +{
 +    "​command":​ "​changeWeatherConditions",​
 +    "​message":​ "The weather has changed.",​
 +    "​timestamp":​ 11
 +},
 +{
 +    "​command":​ "​changeWeatherConditions",​
 +    "​message":​ "The weather has changed.",​
 +    "​timestamp":​ 12
 +}
 +</​code>​
 +</​spoiler>​
 +
 +\\
 +==== Comenzi pentru TerraBot ====
 +
 +==== Comenzi de debug ====
 +
 +==== getEnergyStatus====
 +
 +  * returnează energia curenta a TerraBot-ului
 +
 +Mesaje posibile pentru aceasta comanda:
 +
 +  * ''​%%"​TerraBot has ${energy_points} energy points left."​%%''​
 +  * ''​%%"​ERROR:​ Simulation not started. Cannot perform action"​%%''​
 +
 +== Input ==
 +
 +<spoiler Click pentru input getEnergyStatus>​
 +<code json>
 +{
 +    "​command":​ "​getEnergyStatus",​
 +    "​timestamp":​ 8
 +}
 +</​code>​
 +</​spoiler>​
 +
 +== Output ==
 +
 +<spoiler Click pentru output getEnergyStatus>​
 +<code json>
 +{
 +    "​command":​ "​getEnergyStatus",​
 +    "​message":​ "​TerraBot has 189 energy points left.",​
 +    "​timestamp":​ 8
 +}
 +</​code>​
 +</​spoiler>​
 +
 +\\
 +
 +==== printEnvConditions====
 +
 +
 +  * se printeaza pentru patratica curenta urmatoarele:​
 +      * tipul de planta, daca exista ​
 +      * tipul de animal, daca exista
 +      * tipul de sursa de apa, daca exista
 +      * componenta solului
 +      * componenta aerului
 +
 +
 +== Input ==
 +
 +<spoiler Click pentru input printEnvConditions>​
 +<code json>
 +{
 +    "​command":​ "​printEnvConditions",​
 +    "​timestamp":​ 5
 +}
 +</​code>​
 +</​spoiler>​
 +
 +== Output ==
 +
 +<spoiler Click pentru output printEnvConditions>​
 +<code json>
 +{
 +    "​command":​ "​printEnvConditions",​
 +    "​output"​ : {
 +        "​soil":​ {
 +            "​type":​ "​ForestSoil",​
 +            "​nitrogen":​ 3.2,
 +            "​waterRetention":​ 0.55,
 +            "​soilpH":​ 6.8,
 +            "​organicMatter":​ 0.4,
 +            "​leafLitter":​ 0.3
 +        },
 +        "​plant":​ {
 +            "​type":​ "​Algae",​
 +            "​name":​ "​RedAlgae",​
 +        },
 +        "​animal":​ {
 +            "​type":​ "​Herbivores",​
 +            "​name":​ "​Cow"​
 +        },
 +        "​water":​ {
 +            "​type":​ "​lake",​
 +            "​purity":​ 92.0,
 +            "​salinity":​ 0.5,
 +            "​turbidity":​ 4,
 +            "​contaminantIndex":​ 1.5,
 +            "​pH":​ 6.8,
 +            "​isFrozen":​ false,
 +        },
 +        "​air":​ {
 +            "​type":​ "​Tropical Air",
 +            "​mass":​ 1500000.0,
 +            "​humidity":​ 85.0,
 +            "​temperature":​ 30.5,
 +            "​oxygenLevel":​ 21,
 +            "​co2Level":​ 400.0
 +        }
 +    },
 +    "​timestamp":​ 5
 +}
 +</​code>​
 +</​spoiler>​
 +
 +\\
 +==== printMap====
 +
 +  * se printeaza pentru fiecare patratica de pe harta urmatoarele:​
 +      * nr total enitati de pe patratica (sum(plant, animal, water_source))
 +      * calitate aerului
 +      * calitatea solului ​
 +
 +Mesaje posibile pentru aceasta comanda:
 +
 +  * ''​%%"​Simulation has ended."​%%''​
 +  * ''​%%"​ERROR:​ Simulation not started. Cannot perform action"​%%''​
 +
 +== Input ==
 +
 +<spoiler Click pentru input printMap>​
 +<code json>
 +{
 +    "​command":​ "​printMap",​
 +    "​timestamp":​ 23
 +}
 +</​code>​
 +</​spoiler>​
 +
 +== Output ==
 +
 +<spoiler Click pentru output printMap>​
 +<code json>
 +{
 +    "​command":​ "​endSimulation",​
 +    "​message":​ "​Simulation has ended.",​
 +    "​timestamp":​ 10
 +}
 +</​code>​
 +</​spoiler>​
 +
 +\\
 +==== printKnowledgeBase====
 +
 +  * afiseaza pentru fiecare tip de obiect fact-urile invata ​
 +     * exemplu: s-a scanat si invatat despre red algae, se printeaza toate facts despre red algae
 +
 +===== Exemplu simulare =====
  
  
Line 127: Line 430:
   * Tema fiind o specificație destul de stufoasă recomandăm citirea de cel putin două ori a enunțului inainte de inceperea implementării.   * Tema fiind o specificație destul de stufoasă recomandăm citirea de cel putin două ori a enunțului inainte de inceperea implementării.
   * Pentru depanarea diferențelor dintre output-ul vostru si fișierele ref, vă recomandăm [[https://​www.jsondiff.com/​|acest site]].   * Pentru depanarea diferențelor dintre output-ul vostru si fișierele ref, vă recomandăm [[https://​www.jsondiff.com/​|acest site]].
-  * Verificați periodic această pagină, deoarece scheletul/​cerința pot suferi modificări în urma unor erori din partea noastră.+ 
 +<note important>​Verificați periodic această pagină, deoarece scheletul/​cerința pot suferi modificări în urma unor erori din partea noastră.</​note>​
  
 ===== Evaluare ===== ===== Evaluare =====
Line 187: Line 491:
  
 **Q**: Ce JDK recomandați?​\\ **Q**: Ce JDK recomandați?​\\
-**A**: ​11+**A**: ​25
  
 **Q**: Pot să fac în orice ordine testele?\\ **Q**: Pot să fac în orice ordine testele?\\
-**A**: Da! Testele au fost concepute sa fie cât mai decuplate și să testeze câte o funcționalitate în întregime. Cu toate astea, vă recomandăm să implementați mai întâi testele 01, 02, 03 deoarece reprezintă ​preambulul fiecărui joc.+**A**: Da! Testele au fost concepute sa fie cât mai decuplate și să testeze câte o funcționalitate în întregime. Cu toate astea, vă recomandăm să implementați mai întâi testele 01, 02, 03 deoarece reprezintă ​funcționalitățile de bază pentru rezolvarea următoarelor teste mai complexe.
 ===== Resurse și linkuri utile ===== ===== Resurse și linkuri utile =====
  
-  * [[https://​github.com/​oop-pub/​oop-asignments/​tree/​master/​teme/​tema|Schelet de cod]] +  * [[todo|Schelet de cod]] 
-  * [[https://​curs.upb.ro/​2024/​mod/​forum/​view.php?​id=46751|Forum]] +  * [[todo|Forum]] ​
-  * [[https://​www.youtube.com/​watch?​v=c3oXzl3kxSw|Hearthstone short gameplay]] +
-  * [[https://​www.youtube.com/​watch?​v=QE6V8NgKLEQ|Gwent short gameplay]]+
   * [[poo-ca-cd:​administrativ:​barem_teme|Indicații pentru teme]]   * [[poo-ca-cd:​administrativ:​barem_teme|Indicații pentru teme]]
   * [[poo-ca-cd:​administrativ:​coding_style_ide|Recomandări coding style & javadoc]]   * [[poo-ca-cd:​administrativ:​coding_style_ide|Recomandări coding style & javadoc]]
poo-ca-cd/teme/2025/8e211bfe-f6eb-467c-9e54-f8e6df4c1535/tema-1.1759515839.txt.gz · Last modified: 2025/10/03 21:23 by ioana.tudorache2507
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0