-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenTris.pro
49 lines (47 loc) · 1.23 KB
/
genTris.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
:- use_module(library(csv)).
:- use_module(pokemonTypeUtils).
:- initialization(main).
main :-
findall(row(SA, SB, SC), (
triangle(1, A, B, C),
term_to_atom(A, SA),
term_to_atom(B, SB),
term_to_atom(C, SC)
), Rows),
csv_write_file("triangles1.csv", Rows),
findall(row(SA, SB, SC), (
triangle(2, A, B, C),
term_to_atom(A, SA),
term_to_atom(B, SB),
term_to_atom(C, SC)
), Rows2),
csv_write_file("triangles2.csv", Rows2),
findall(row(SA, SB, SC), (
triangle(3, A, B, C),
term_to_atom(A, SA),
term_to_atom(B, SB),
term_to_atom(C, SC)
), Rows3),
csv_write_file("triangles3.csv", Rows3),
findall(row(SA, SB, SC), (
triangle(4, A, B, C),
term_to_atom(A, SA),
term_to_atom(B, SB),
term_to_atom(C, SC)
), Rows4),
csv_write_file("triangles4.csv", Rows4),
findall(row(SA, SB, SC), (
triangle(5, A, B, C),
term_to_atom(A, SA),
term_to_atom(B, SB),
term_to_atom(C, SC)
), Rows5),
csv_write_file("triangles5.csv", Rows5),
findall(row(SA, SB, SC), (
triangle(6, A, B, C),
term_to_atom(A, SA),
term_to_atom(B, SB),
term_to_atom(C, SC)
), Rows6),
csv_write_file("triangles6.csv", Rows6),
halt.