daily pastebin goal
13%
SHARE
TWEET

Untitled

Qpel Mar 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Cdalele
  2.     def initialize(x,y,dx,dy)
  3.     @x=x
  4.     @y=y
  5.     @dx=dx
  6.     @dy=dy
  7. end
  8. def suolis()
  9.     @x+=rand(-@dx..@dx)
  10.     @y+=rand(-@dy..@dy)
  11.     print "x=", @x, "y=", @y, "\n"
  12.     end
  13. end
  14. dalele = Cdalele.new(5,10,1,1)
  15. dalele.suolis()
  16. dalele.suolis()
  17. dalele.suolis()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top