Skip to content

Commit

Permalink
changed player: throw now returns snowball%
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Lind committed Apr 18, 2012
1 parent a06476e commit 2a4a20b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.rkt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(class object% (class object%
(super-new) (super-new)


(field (x 0) (y 0) ;; possition of object on screen (field (x 0) (y 0) ;; position of object on screen
(sx 0) (sy 0) ;; space occupied by object on screen (sx 0) (sy 0) ;; space occupied by object on screen
(sprite "")) ;; path to image representing object on screen (sprite "")) ;; path to image representing object on screen


Expand Down Expand Up @@ -40,7 +40,7 @@


;---------------actions---------------------- ;---------------actions----------------------
(define/public (hit!) (if (> hp 0) (set! hp (- hp 1)) (display "Error already dead!"))) (define/public (hit!) (if (> hp 0) (set! hp (- hp 1)) (display "Error already dead!")))
(define/public (throw!) (display "Throwing snowball...")))) ;; Temporary (define/public (throw) (new snowball%))))






Expand Down

0 comments on commit 2a4a20b

Please sign in to comment.