--- a/magitek.asd Sat Jan 21 01:33:05 2017 +0000
+++ b/magitek.asd Tue Jan 24 19:11:54 2017 +0000
@@ -42,5 +42,6 @@
(:module "robots"
:components ((:file "git-commands")
(:file "hacker-booze")
+ (:file "frantic-barista")
(:file "rpg-shopkeeper")))
(:file "main")))))
--- a/package.lisp Sat Jan 21 01:33:05 2017 +0000
+++ b/package.lisp Tue Jan 24 19:11:54 2017 +0000
@@ -52,6 +52,15 @@
:magitek.quickutils)
(:export :random-string))
+(defpackage :magitek.robots.frantic-barista
+ (:use
+ :cl
+ :iterate
+ :losh
+ :chancery
+ :magitek.quickutils)
+ (:export :random-string))
+
(defpackage :magitek.robots.hacker-booze
(:use
:cl
--- a/src/main.lisp Sat Jan 21 01:33:05 2017 +0000
+++ b/src/main.lisp Tue Jan 24 19:11:54 2017 +0000
@@ -20,6 +20,11 @@
#'magitek.robots.rpg-shopkeeper:random-string
12))
+(defparameter *frantic-barista*
+ (make-bot :frantic-barista
+ #'magitek.robots.frantic-barista:random-string
+ 6))
+
(defun hours-to-minutes (h)
(* h 60))
@@ -53,5 +58,6 @@
(defun main ()
(spinup)
+ (run-bot *frantic-barista*)
(run-bot *git-commands*)
(run-bot *rpg-shopkeeper*))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/robots/frantic-barista.lisp Tue Jan 24 19:11:54 2017 +0000
@@ -0,0 +1,126 @@
+(in-package :magitek.robots.frantic-barista)
+(named-readtables:in-readtable :chancery)
+
+;;;; Utils --------------------------------------------------------------------
+(defun english-number (n)
+ (format nil "~R" n))
+
+
+;;;; Names --------------------------------------------------------------------
+(define-string name-simple
+ "Sophia"
+ "Jackson"
+ "Emma"
+ "Aiden"
+ "Olivia"
+ "Lucas"
+ "Ava"
+ "Liam"
+ "Mia"
+ "Noah"
+ "Isabella"
+ "Ethan"
+ "Riley"
+ "Mason"
+ "Aria"
+ "Caden"
+ "Zoe"
+ "Oliver"
+ "Charlotte"
+ "Elijah"
+ "Lily"
+ "Grayson"
+ "Layla"
+ "Jacob"
+ "Amelia"
+ "Michael"
+ "Emily"
+ "Benjamin"
+ "Madelyn"
+ "Carter"
+ "Aubrey"
+ "James"
+ "Adalyn"
+ "Jayden"
+ "Madison"
+ "Logan"
+ "Chloe"
+ "Alexander"
+ "Harper"
+ "Caleb")
+
+(define-string name-twitter
+ "@stevelosh"
+ "@fu86"
+ "@rpg_shopkeeper"
+ "@git_commands")
+
+(define-string (name :distribution :weighted)
+ (50 name-simple)
+ (1 name-twitter))
+
+
+;;;; Liquids ------------------------------------------------------------------
+(define-string liquid
+ "coffee"
+ "cappuccino"
+ "mocha"
+ "latte"
+ "espresso"
+ "tea"
+ "chai"
+ "hot chocolate")
+
+
+;;;; Sizes --------------------------------------------------------------------
+(define-string size-simple
+ "small"
+ "medium"
+ "large")
+
+(define-string size-pretentious
+ "short"
+ "tall"
+ "grande"
+ "venti")
+
+(define-string (size :distribution :weighted)
+ (5 size-simple)
+ (1 size-pretentious))
+
+
+;;;; Flavor -------------------------------------------------------------------
+(define-string adjective
+ "artisanal"
+ "hand-crafted"
+ "fresh"
+ "decaf"
+ "day-old")
+
+(define-string topping
+ "whipped cream"
+ "cinnamon"
+ "sprinkles")
+
+
+;;;; Main ---------------------------------------------------------------------
+(define-string drink-base
+ liquid
+ (size liquid)
+ (adjective size liquid)
+ (adjective liquid))
+
+(define-string drink
+ drink-base
+ (drink-base "with" topping))
+
+(define-string order
+ ("I've got" [drink a] "for" name "here!")
+ ([!(random-range-inclusive 2 9) english-number cap]
+ [drink-base s] "under" name :. ", to go!"))
+
+
+;;;; API ----------------------------------------------------------------------
+(defun random-string ()
+ (order))
+