2024-03-22 00:37:54 -04:00
|
|
|
with core, ui, ai;
|
|
|
|
|
|
|
|
use ai;
|
|
|
|
|
|
|
|
package body ai is
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
2024-03-24 09:14:54 -04:00
|
|
|
function agent_is_envious (index : in natural) return boolean is begin return (agent (index).soul and envy) = envy; end agent_is_envious;
|
|
|
|
function agent_is_glutton (index : in natural) return boolean is begin return (agent (index).soul and gluttony) = gluttony; end agent_is_glutton;
|
|
|
|
function agent_is_greed (index : in natural) return boolean is begin return (agent (index).soul and greed) = greed; end agent_is_greed;
|
|
|
|
function agent_is_slutty (index : in natural) return boolean is begin return (agent (index).soul and lust) = lust; end agent_is_slutty;
|
|
|
|
function agent_is_proud (index : in natural) return boolean is begin return (agent (index).soul and pride) = pride; end agent_is_proud;
|
|
|
|
function agent_is_lazy (index : in natural) return boolean is begin return (agent (index).soul and sloth) = sloth; end agent_is_lazy;
|
|
|
|
function agent_is_angry (index : in natural) return boolean is begin return (agent (index).soul and wrath) = wrath; end agent_is_angry;
|
|
|
|
function agent_is_thirsty (index : in natural) return boolean is begin return (agent (index).mind and thirst) = thirst; end agent_is_thirsty;
|
|
|
|
function agent_is_hungry (index : in natural) return boolean is begin return (agent (index).mind and hunger) = hunger; end agent_is_hungry;
|
|
|
|
function agent_is_tired (index : in natural) return boolean is begin return (agent (index).mind and fatigue) = fatigue; end agent_is_tired;
|
|
|
|
function agent_is_lonely (index : in natural) return boolean is begin return (agent (index).mind and solitude) = solitude; end agent_is_lonely;
|
|
|
|
function agent_is_healthy (index : in natural) return boolean is begin return (agent (index).mind and health) = health; end agent_is_healthy;
|
|
|
|
function agent_is_happy (index : in natural) return boolean is begin return (agent (index).mind and joy) = joy; end agent_is_happy;
|
|
|
|
function agent_is_bored (index : in natural) return boolean is begin return (agent (index).mind and boredom) = boredom; end agent_is_bored;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
procedure action_none is begin null; end action_none;
|
|
|
|
procedure action_walk is begin null; end action_walk;
|
|
|
|
procedure action_talk is begin null; end action_talk;
|
|
|
|
procedure action_find is begin null; end action_find;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
2024-03-24 08:07:42 -04:00
|
|
|
|
2024-03-22 00:37:54 -04:00
|
|
|
procedure configure is
|
|
|
|
begin
|
2024-03-22 11:08:37 -04:00
|
|
|
core.echo (core.failure, "No AI yet folk!");
|
2024-03-22 00:37:54 -04:00
|
|
|
end configure;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-03-24 07:46:56 -04:00
|
|
|
procedure synchronize is
|
|
|
|
begin
|
|
|
|
core.echo (core.failure, "No AI yet folk!");
|
|
|
|
end synchronize;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-03-24 09:14:54 -04:00
|
|
|
procedure review is
|
|
|
|
width : integer := 600;
|
|
|
|
height : integer := 300;
|
|
|
|
offset : integer := 32;
|
|
|
|
x : integer := (core.window_width - width) / 2;
|
|
|
|
y : integer := (core.window_height - height) / 2;
|
|
|
|
begin
|
|
|
|
ui.draw_tiny_menu (x, y, width, height, true);
|
|
|
|
for index in 1 .. agent_count
|
|
|
|
loop
|
|
|
|
core.write ("Bot" & integer'image (index), x + offset + 0, y * index + offset, ui.glyphs (ui.active));
|
|
|
|
core.write ("T =" & boolean'image (agent_is_thirsty (index)), x + offset + 120, y * index + offset, ui.glyphs (ui.active));
|
|
|
|
core.write ("H =" & boolean'image (agent_is_hungry (index)), x + offset + 240, y * index + offset, ui.glyphs (ui.active));
|
|
|
|
end loop;
|
|
|
|
end review;
|
2024-03-22 11:08:37 -04:00
|
|
|
|
2024-03-22 00:37:54 -04:00
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end ai;
|