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

Hi!

I’ve made a small example for Shoes.

It’s complete clone of windows minesweeper. The code is not very good, but, IMHO, good enough to demonstrate power of ruby+shoes :)

Source length is ~270 loc.

Screenshots: windows, mac, ubuntu

Posted to the Shoes Mailing List By Que on Feb 12, 2008


Speak now or forever hold your peace:

Jesse
February 23, 2008

This app is teh awexome!

It seem solid as hell to me. I have no bugs to add save the ones from the list, which I’ll paste here for convenience.

• Nick Moffitt: I’ve noticed that the mouse buttons (middle, right) appear to be switched on my Ubuntu 7.10 box. Someone mentioned the same problem in the #shoes channel on freenode.

So basically I end up right-clicking to filter squares and middle-clicking to place flags.

I’m running the shoes-0.r396 release because the current SVN version gives me a “uninitialized constant Gem::Ext” error whenever I run it, so that may be part of this.

Anyway, beaujolais to minesweeper!

• jawbroken:

I also noticed that on my mac, running OS X, a ctrl-click isn’t registered as a right click in the game. Putting two fingers on the trackpad and clicking (the other way to right click) does count as a right click, however. I am not sure if this should be handled by Shoes or by the program, however.

Also, clicking on the Beginner/Intermediate/Expert buttons while in the middle of a game doesn’t change to that difficulty, you have to purposefully lose first. Not sure if that is a bug or a feature, but it was unexpected for me.

Nick Moffitt
February 24, 2008

Just to follow up on that, I figured out what i was doing wrong with the SVN head of shoes and got it built on Ubuntu. I still see the middle/right click swap problem, however. I should check to see if midnight ‘roids does this as well.

JohnB
April 6, 2008

I have a wireless mighty mouse that I use with OS X and can’t seem to get the right-click to work. After a bit of fiddling I made the center track-ball click to be “click3” and tweaked the code to replace 2 with 3 and ignore the ‘reveal’ option that used to be accessed via 3. So… it works great! And I’ll show it to the kids and see what they want to change – get them into programming the way I did – with games!

thanks _why and whoever wrote the minesweeper app!

Duncan Bayne
May 10, 2008

Did you ever have any luck sorting out the “uninitialized constant Gem::Ext” error? I’m trying to get it going on Xubuntu Hardy Heron and it’s driving me nuts! ARGH! :-(


How do I use this?