Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :- dynamic player/2.
- register(Move, _) :-
- sent_by(Email, Move),
- player(Email, Name),
- reply_to(Move, 'Already a player, named ~a', [Name]).
- register(_, Name) :-
- player(Email, Name),
- reply_to(Move, 'Name taken by ~a', [Email]).
- register(Move, Name) :-
- sent_by(Email, Move),
- assert(player(Email, Name)),
- reply_to(Move, 'Welcome to the game!').
Add Comment
Please, Sign In to add comment