The following text was written to the standard output stream when the dotsville_i.pro program was executed from swi-prolog.
mcruz@arch-desktop$ swipl
Welcome to SWI-Prolog (Version 2.7.16)
Copyright (c) 1993-1996 University of Amsterdam.
All rights reserved.
For help, use ?- help(Topic). or ?- apropos(Word).
?- interpreter.
|: display the world.
- - - - - -
|: fill the world.
|: display the world.
R B O R P Y
R G O P R P
Y B P P G O
B G Y O B Y
- - - - - -
|: clear the world.
|: display the world.
- - - - - -
|: add a dot.
|: display the world.
B
- - - - - -
|: is there a dot?
Yes.
|: list the dots.
dot(cell(1,1),color(blue))
|: add a red dot.
|: display the world.
B R
- - - - - -
|: is there a dot on the table?
Yes.
|: is there a dot not on the table?
----------------------------------------------
is there a dot not on the table?
No.
is there a red dot?
Yes.
is there a yellow dot?
No.
is there a blue dot on the table?
Yes.
add a yellow dot to column 1.
display the world.
B R Y
- - - - - -
how many dots in column 1?
1
how many dots in column 2?
0
how many dots in the world?
3
is column 1 empty?
No.
is column 2 full?
No.
remove a dot from column 4.
display the world.
B Y
- - - - - -
is there a red dot not on the table?
Yes.
is there a yellow dot to the left of a blue dot?
No.
is there a green dot to the right of a yellow dot?
No.
add a dot.
add a dot.
display the world.
B B P Y
- - - - - -
add a red dot.
display the world.
B
B B P Y
- - - - - -
how many blue dots in the world?
3
move a dot from column 3 to column 2.
display the world.
B B B P Y
- - - - - -
how many spaces available in column 4?
3
how many spaces available in the world?
19
list the dots in column 2.
dot(cell(1,2),color(blue))
list the blue dots.
dot(cell(1,3),color(blue))
dot(cell(1,2),color(blue))
stop.
% Execution Aborted