# Bug Fixes 1

765 views

In my last post, I talked about the Undo feature that was implemented. Undo allows you to revert the last valid move that you made and will put back the score that you had then, with a hit of two points. I demonstrated all the different ways that you can undo your moves, basically all the different possible moves that constitute a valid Undo move.

Furthermore, I introduced a bunch of bug fixes related to the game. I did not demonstrate how the bug fixes are now working, however, this blog post future blog posts that include bug fixes will now be accompanied by a small demonstration of the expected result.

I had scheduled some time for me to work on the Autocomplete feature. For this feature, the user will be able to right click anywhere on the board, and all the cards that are face up that can be moved to any of the foundations will be moved there. As I was preparing myself to start work on this feature, I glanced over at the number of bugs that were lingering, and I felt that it would be a nice gesture to get a few of the bugs out the door before I start work on a new feature.

Therefore, I took a step back and got to work on a bunch of bugs, which I will present to you below, and one feature that handles the spacing of the cards more accurately to that of the original game.

This is now working, and as you can see, performing an undo after clicking on the stock, will now subtract 2 from your score

There is an issue related to the container of the game being invalidated, causing a refresh and whatever card you have on that container having its bounds set to 0,0. This is now fixed and working as expected.

There was an assumption made a while back that if something is not visible, it should not be able to receive events.

This is obviously not a good assumption to make. The code has been changed so that all registered objects of a particular event will receive event handler invokes, and it is up to the underlying object to handle if it should do something or not.

There was a small miscalculation when the card's bounds were being computed. This is now working as expected.

This required the underlying game view to be refreshed, this is now working as expected.

6. Talon Card Proportions (NEW FEATURE)

The spacing on the tableau views is now proportional to that from the original Solitaire game. Cards that have their backsides shown are approximately 3 pixels apart on the y-axis.
Whenever a card has it's face shown, further cards below will be approximately 12 pixels apart. This feature will now work as expected. I still have to handle the stock and the talon views
with respect to proportions, those have been logged as feature requests.

This issue is related to other issues with the container being invalidated, this is now working as expected.

This issue is related to other issues with the container being invalidated, this is now working as expected.

This issue is related to other issues with the container being invalidated, this is now working as expected.

Now that I've closed a lot of bugs, It's time to implement another feature. I will continue my work on the Autocomplete item.

You can always follow my progress by following the game located at https://github.com/danielricci/solitaire and if you have any questions I will do my best to answer them.

Take care, until my next blog post.

don't really have anything constructive to say.. but wanted to tell you that I enjoyed reading this post.

2 hours ago, A4L said:

don't really have anything constructive to say.. but wanted to tell you that I enjoyed reading this post.

Thank you!

Agreed with @A4L, even though I have nothing especially constructive to add, I enjoyed the walkthrough of all the changes!

Keep up the great work!

## Create an account

Register a new account

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.