cc4531cd1e
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@53 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
29 lines
463 B
Plaintext
29 lines
463 B
Plaintext
|
|
:- object(space).
|
|
|
|
|
|
:- public(xyz/3).
|
|
:- mode(xyz(?integer, ?integer, ?integer), zero_or_one).
|
|
|
|
:- private(xyz_/3).
|
|
:- mode(xyz_(?integer, ?integer, ?integer), zero_or_one).
|
|
:- dynamic(xyz_/3).
|
|
|
|
:- public(rotate/3).
|
|
:- mode(rotate(+integer, +integer, +integer), zero_or_one).
|
|
|
|
|
|
xyz(X, Y, Z) :-
|
|
::xyz_(X, Y, Z).
|
|
|
|
|
|
rotate(X, Y, Z) :-
|
|
integer(X),
|
|
integer(Y),
|
|
integer(Z),
|
|
::retractall(xyz_(_, _, _)),
|
|
::assertz(xyz_(X, Y, Z)).
|
|
|
|
|
|
:- end_object.
|