Commit e84b0c31 authored by Aluriak's avatar Aluriak

add example from the hitman game

parent 1e920797
hitman:
python -m biseau hitman.lp -o hitman.png
xdg-open hitman.png
% Drawing of the graph hitman.png,
% where the different game packaging are represented as nodes
% and buyable items are represented as edges.
% The green path is the advised one for a newcomer wanting the full content.
% obj_property(graph,rankdir,"LR").
obj_property(node,shape,rectangle).
link("Start",(none;hitman1)).
color("Start",(none;hitman1),red).
color("Start",red).
link(u_1,u_2).
color(u_1,u_2,blue).
label((u_1;u_2),""). label(u_1,u_2,"advised path"). % label(u_2,"advised path";u_1,"").
color((u_1;u_2),transparent).
dot_property((u_1;u_2),color,transparent).
advised(none,hitman2_gold).
advised(hitman2_gold,hitman2_gold_gotylegacy).
color(X,Y,blue) :- advised(X,Y).
use(none,hitman2_gold,"HITMAN 2 Gold edition").
use(none,hitman2_silver,"HITMAN 2 Silver edition").
use(none,hitman2_standard,"HITMAN 2 Standard edition").
use(hitman1,hitman2_gold_legacy,"HITMAN 2 Gold edition").
use(hitman1,hitman2_silver_legacy,"HITMAN 2 Silver edition").
use(hitman1,hitman2_standard_legacy,"HITMAN 2 Standard edition").
use(hitman2_gold,hitman2_gold_gotylegacy,"GOTY Legacy Pack").
use(hitman2_silver,hitman2_silver_gotylegacy,"GOTY Legacy Pack").
use(hitman2_standard,hitman2_standard_gotylegacy,"GOTY Legacy Pack").
use(hitman2_gold_legacy,hitman2_gold_gotylegacy,"GOTY Legacy Pack Upgrade").
use(hitman2_silver_legacy,hitman2_silver_gotylegacy,"GOTY Legacy Pack Upgrade").
use(hitman2_standard_legacy,hitman2_standard_gotylegacy,"GOTY Legacy Pack Upgrade").
use(hitman2_standard,hitman2_silver,"Silver").
use(hitman2_standard,hitman2_gold,"Gold").
use(hitman2_silver,hitman2_gold,"Silver to Gold").
use(hitman2_standard_gotylegacy,hitman2_silver_gotylegacy,"Silver").
use(hitman2_standard_gotylegacy,hitman2_gold_gotylegacy,"Gold").
use(hitman2_silver_gotylegacy,hitman2_gold_gotylegacy,"Silver to Gold").
link(X,Y) :- use(X,Y,_).
label(X,Y,L) :- use(X,Y,L).
obj_property(edge,arrowhead,normal).
obj_property(edge,fontsize,9).
% Name of packages
label(none,"No Hitman content possessed").
label(hitman1,"HITMAN 2016 (all episodes)").
label(hitman2_standard,"HITMAN 2 Standard Edition").
label(hitman2_silver,"HITMAN 2 Silver Edition").
label(hitman2_gold,"HITMAN 2 Gold Edition").
label(hitman2_standard_legacy,"HITMAN 2 Standard Edition\n+ HITMAN 1 (main locations)").
label(hitman2_silver_legacy,"HITMAN 2 Silver Edition\n+ HITMAN 1 (main locations)").
label(hitman2_gold_legacy,"HITMAN 2 Gold Edition\n+ HITMAN 1 (main locations)").
label(hitman2_standard_gotylegacy,"HITMAN 2 Standard Edition\n+ Full content HITMAN 1").
label(hitman2_silver_gotylegacy,"HITMAN 2 Silver Edition\n+ Full content HITMAN 1").
label(hitman2_gold_gotylegacy,"Full content HITMAN (1 & 2 & all extensions)").
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment