From f50e97a59ea992e5475449763177690b4005506b Mon Sep 17 00:00:00 2001 From: Boutade Date: Sat, 28 Sep 2019 22:45:43 -0500 Subject: added readable-username function --- examples/roshambot.lisp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/roshambot.lisp b/examples/roshambot.lisp index fcb3198..be870bb 100644 --- a/examples/roshambot.lisp +++ b/examples/roshambot.lisp @@ -94,8 +94,10 @@ (cancelled-by (roshambo-cancelled!? roshambo-match) (send-text-message bot (roshambo-match-room roshambo-match) "The match between ~a and ~a was canceled by ~a." - (roshambo-match-challenger roshambo-match) - (roshambo-match-challenged roshambo-match) + (readable-username + (roshambo-match-challenger roshambo-match)) + (readable-username + (roshambo-match-challenged roshambo-match)) cancelled-by) (kill-roshambo-match bot roshambo-match)) (win-list (roshambo-has-winner!? roshambo-match) @@ -103,10 +105,16 @@ (if (eql winner :draw) ; this is a draw move (send-text-message bot (roshambo-match-room roshambo-match) "It's a draw! Both ~a and ~a picked ~a." - win-move loser lose-move) + (readable-username win-move) + (readable-username loser) + lose-move) (send-text-message bot (roshambo-match-room roshambo-match) "~a's ~a beats ~a's ~a! ~a is the winner!~%" - winner win-move loser lose-move winner))) + (readable-username winner) + win-move + (readable-username loser) + lose-move + (readable-username winner)))) (kill-roshambo-match bot roshambo-match)))) -- cgit v1.2.3