Posts tagged: Freecell

Freecell version 2.2

Anyone who tried out my version of Freecell for the Blackberry Playbook will have realised that it was very basic. In order to get it submitted in time for the promotion I had to leave it at the bare minimum. During a few hardware upgrades I managed to delete the source code, so I decided to completely re-write it for a version 2.0 release. Over the past two weeks I have released another 2 updates, bringing the version count to 2.2. Hopefully this version addresses many of theĀ deficienciesĀ in the original release.

Version 2.0:

  • Complete re-write.
  • Added ability to move groups of cards.
  • Added kingOnly option.
  • Added card remaining count and game timer.
  • Added sound effects for card move and game completion.

Version 2.1:

  • Minor bug fixes.
  • Added double-click logic to send card to home cells or free cells.

Version 2.2:

  • Added safe and aggressive auto play logic. Safe auto play mirrors the moves made by Microsoft Freecell and Freecell Pro. Aggressive auto play mirrors the moves made by NetCell.

You can find the app in Blackberry AppWorld here:

http://appworld.blackberry.com/webstore/content/35083?lang=en

Or by scanning the QR code below:

 

{lang: 'en-GB'}

Freecell for Blackberry Playbook

As part of RIM’s recent Playbook promotion, I wrote and submitted a free Freecell app for the tablet. If you’re lucky enough to already have a Playbook (mainly the USA at the moment) please feel free to download the app and leave me feedback.

You can find the app in Blackberry AppWorld here:

http://appworld.blackberry.com/webstore/content/35083?lang=en

Or by scanning the QR code below:

 

{lang: 'en-GB'}

Clickable, Transparent Sprite in AS 3

For the past few days I have had a problem. In ActionScript I wanted to do the following:

	public class TableauPile extends Sprite
	{
		public function TableauPile()
		{
			setImage();
		}
		private function setImage():void
		{
			width = 74;
			height = 98;
			graphics.clear();
			graphics.lineStyle(2,0xC0C0C0);
			graphics.drawRect(0,0,74,98);
			graphics.endFill();
		}
	}

This draws a nice “empty” box, allowing you to see the background beneath it. Oddly though, it doesn’t respond to mouse down events. Not unless you are lucky enough to accidentally click on the thin border. Attempting to write a FreeCell clone in Actionscript, as I am, it would be useful to receive mouse down events for empty boxes.

After much head scratching, Googling, and experimentation I have discovered that the only way to get the sprite to respond to mouse down events, is to fill it with a solid colour and set the alpha to 0. This can be accomplished by adding the following line before the endFill statement:

	graphics.beginFill(0xFFFFFF,0.0);
{lang: 'en-GB'}

WordPress Themes