Skip to content

Instantly share code, notes, and snippets.

@esehara
Last active August 29, 2015 14:05
Show Gist options
  • Save esehara/c0cbd8809c440f0720c7 to your computer and use it in GitHub Desktop.
Save esehara/c0cbd8809c440f0720c7 to your computer and use it in GitHub Desktop.
呪わば
% Title: 人を呪わば穴二つ
% Date: 2014/08/31
死ぬ(1, 0).
死ぬ(LIVING, DEAD) :-
plus(DEAD, 1, LIVING).
掘る(0, 2).
掘る(NOROWABA, ANA) :-
plus(NOROWABA, 2, ANA).
呪う(NOROU, NOROWARERU, 0):-
NOROU < 1,
NOROWARERU < 1.
呪う(NOROU, 0, ANA):-
ANA > NOROU.
呪う(0, NOROWARERU, ANA) :-
ANA > NOROWARERU.
呪う(NOROU, NOROWARERU, ANA) :-
ANA > NOROWARERU * 2,
死ぬ(NOROU, NOROTTA),
死ぬ(NOROWARERU, NOROWARETA),
呪う(NOROTTA, NOROWARETA, NOROWABA),
掘る(NOROWABA, ANA).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment