This repository was archived by the owner on May 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Functions (Library C)
Jonas Götz edited this page Jan 12, 2024
·
1 revision
Definition Funktionsablauf: ----- Game start -----
- Socket connection to sever
- if all clients are connected -> config json to clients
- set config const var ----- Game loop -----
- Function game_loop
- gets called with every server update
- if new server update while client is still running
- json data gets cached
- if new server response && already cached
- cache gets replaced by new json data
- if new server response && already cached
- after game_loop is finished
- if cache exists
- game_loop gets called with cache data
- clear cache
- game_loop gets called with cache data
- else wait for next server update
- if cache exists
- json data gets cached
- Breaking async function wartet auf json
--- deprecated ---
- get_distance(entity1: Entity, entity2: Entity): uint
- get_ores_in_range(entity: Entity): List
- get_ores()
- for each ore
- is_in_range()?
- get_units_in_range(entity: Entity): List
- get_units()
- for each unit
- is_in_range()?
- get_cores_in_range(entity: Entity): List
- get_cores()
- for each core
- is_in_range()?
- get_closest(list: List): Entity
- check type of entity
- get__in_range
- sort by range
- give index first entity
- move_start(enity: Entity, dir: Vec<x, y>): Bool
- move_to(entity: Entity, pos: Vec<x, y>): Bool
- move_stop(entity: Entity): Bool
- attack_start(attacker: Entity, attacked, entity): Bool
- attack_stop(attacker: Entity): Bool
- collect(entity: Entity): Bool
- buy(entity: Entity): Bool
- Concept
- Contribution_guide
- Home
- README
- References
- Repos
- Rules
- Meetings
- patches
-
server
-
protokolle
-
actions
- ansible
- batch-api
- domains
- github-runner
- k82
-
actions
-
protokolle
- visualizer
- wiki