From 3a9bb4886317e82aee1a45e4b643b5973c5215f9 Mon Sep 17 00:00:00 2001 From: El-BG-1970 Date: Sun, 7 Aug 2022 13:45:02 +0200 Subject: implemented game;commodities-panel --- src/player.lisp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/player.lisp') diff --git a/src/player.lisp b/src/player.lisp index 32757d0..b5c8651 100644 --- a/src/player.lisp +++ b/src/player.lisp @@ -16,9 +16,11 @@ ((name :initarg :name :reader name) (cash :initarg :cash - :accessor cash) + :accessor cash + :reader get-cash) (debt :initarg :debt - :accessor debt) + :accessor debt + :reader get-debt) (hp :initform 100 :accessor hp) (clout :initform 0 @@ -34,14 +36,6 @@ :cash cash :debt debt)) -(defmethod get-debt ((p player)) - (with-slots (debt) p - debt)) - -(defmethod get-cash ((p player)) - (with-slots (cash) p - cash)) - (defmethod buy-item ((p player) item quantity) (with-slots (stock cash) p (let ((cost (* quantity -- cgit v1.2.3