diff options
| author | El-BG-1970 <elouangros@hotmail.com> | 2022-08-04 11:13:32 +0200 |
|---|---|---|
| committer | El-BG-1970 <elouangros@hotmail.com> | 2022-08-04 11:13:32 +0200 |
| commit | 164b961cdd97c4ef324bbb0ae5f46b394201183b (patch) | |
| tree | 0051bfc0d5c91e150eec85f8860f3244332a0764 /src/zone.lisp | |
| parent | 8104b4db1c5752b777d17e1f84f8a575587c735f (diff) | |
| download | transacc-164b961cdd97c4ef324bbb0ae5f46b394201183b.tar.gz | |
implemented game:buy-item and game:sell-item
Diffstat (limited to 'src/zone.lisp')
| -rw-r--r-- | src/zone.lisp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/zone.lisp b/src/zone.lisp index 3121a5c..9a27f17 100644 --- a/src/zone.lisp +++ b/src/zone.lisp @@ -1,7 +1,8 @@ (defpackage zone (:use :cl) (:export :new-zone - :name)) + :name + :get-commodity)) (in-package :zone) @@ -15,3 +16,8 @@ (make-instance 'zone :name name :commodities commodities)) + +(defmethod get-commodity ((z zone) commodity-name) + (find-if (lambda (c) (equal (commodities:name c) + commodity-name)) + (commodities z))) |
