Skip to content
Snippets Groups Projects
Select Git revision
  • 13e96ee1c8b42a73b6ec1a7ac6f6dbbed2ef0c0f
  • master default protected
2 results

Test2.xml

Blame
  • GoT.pl 837 B
    %% tywin.
    %% joanna.
    
    %% jamie.
    %% tyrion.
    %% cersei.
    
    %% robert.
    
    %% joffrey.
    %% myrcella.
    %% tommen.
    
    father_of(tywin,jamie).
    father_of(tywin,tyrion).
    father_of(tywin,cersei).
    
    father_of(robert,joffrey).
    father_of(robert,myrcella).
    father_of(robert,tommen).
    
    
    mother_of(joanna,jamie).
    mother_of(joanna,cersei).
    mother_of(joanna,tyrion).
    
    mother_of(cersei,joffrey).
    mother_of(cersei,myrcella).
    mother_of(cersei,tommen).
    
    
    father(Person):-
    	father_of(Person,_).
    
    lannister(tywin).
    lannister(Person):-
    	father_of(Father,Person),
    	lannister(Father).
    
    
    baratheon(robert).
    baratheon(Person):-
    	father_of(Father,Person),
    	baratheon(Father).
    
    
    sibling_of(Sibling1, Sibling2):-
    	father_of(Father, Sibling1),
    	father_of(Father, Sibling2),
    	mother_of(Mother, Sibling1),
    	mother_of(Mother, Sibling2),
    	Sibling1 \= Sibling2,
    	Sibling1 @> Sibling2.