The Shoebox. A place for lil' apps to live in peace and harmony.

Roll pretty six-sided dice, as many as you need! Then clear them all away.

Versions:
.rb
0.1


Speak now or forever hold your peace:

Sobe
July 31, 2008

So sad it does not work for me : - Ruby 1.8.6 - Shoes r751

First error is about “grey” or “gray”... Let’s say “red” instead !

The second one is on the “image” block : Shoes believe it takes 3 args instead of 2 (that’s wrong: actually, it takes 5 plus a block…).

Didn’t find how to make it run…

garg
August 15, 2008

neat. It doesn’t render the square correctly in ubuntu

Tim
January 1, 2009

Cute. Some thoughts:

ll 51 – 60 the interpreter doesn’t want you to have a space before the parentheses.

Add animation. This seemed to work. Copy + paste this snippet at i.rotate(rand(359)).


     #wobbles the die and rotates it
     throw = animate(90) do
        left += (-13..13).rand
        top += (-13..13).rand
        i.move left, top
        i.rotate(rand(359))
      end
      
      #stops the throw after one second
      timer(1) do
        throw.stop()
      end

Comments Would have helped quite a bit, especially as the variables were quite difficult to interpret. What does iw stand for?

AugustusCaesar
January 12, 2009

Nice idea.

My suggestion: introduce a user-defined configuration.

First option: random colors or value-specific, fixed colors. This can be a simple check-box.

It makes it easier to interprete values.


How do I use this?