refactor: Remove ES6 module syntax and reorder script loading

This commit is contained in:
Kacper Kostka (aider)
2025-04-02 11:52:06 +02:00
parent 8057ba881b
commit a002d4b017
3 changed files with 4 additions and 6 deletions

5
ai.js
View File

@@ -6,8 +6,7 @@ const ANIMAL_HUNGER_MAX = 100;
/**********************************************************************
* CITIZEN AI
**********************************************************************/
// Export functions
export function updateCitizen(cit) {
function updateCitizen(cit) {
cit.hunger += HUNGER_INCREMENT;
if(cit.hunger > HUNGER_MAX) cit.hunger = HUNGER_MAX;
@@ -54,7 +53,7 @@ export function updateCitizen(cit) {
/**********************************************************************
* ANIMAL AI
**********************************************************************/
export function updateAnimal(ani) {
function updateAnimal(ani) {
if(ani.type === "Rabbit") {
updateRabbit(ani);
}