Guest User

Untitled

a guest
May 16th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.88 KB | None | 0 0
  1. (class (Player)
  2.   (attribute _current-piece)
  3.   (attribute _name)
  4.   (attribute _color)
  5.   (attribute _number)
  6.   (attribute _items '())
  7.  
  8.   (method (init name color start-field number)
  9.           (set! _name name)
  10.           (set! _color color)
  11.           (set! _current-piece (send start-field piece))
  12.           (set! _number number)
  13.           (send _current-piece player self))
  14.  
  15.   (method (set-current-piece piece) (set! _current-piece piece))
  16.   (method (current-piece) _current-piece)
  17.   (method (set-items items) (set! _items items))
  18.   (method (name) _name)
  19.   (method (finished?) _items)
  20.   (method (find item) #f)  
  21.   (method (next-item) #f)  
  22.   (method (move direction) #f)  
  23.   (method (draw viewport width height left top) (display "Method draw in Player called") #f))
  24.  
  25. (define (create-Player name color start-field number) (create-instance Player name color start-field number))
Add Comment
Please, Sign In to add comment