Thursday, January 14, 2010

It Runs! It Crashes! It's Fixed!

To the left is a screen shot of the Sudoku application that is developed in the book Hello, Android.  You can click on the screen shot to see more that I captured.  Unlike other screen shots I've posted before these are from my T-Mobile myTouch and not the Android emulator.  Aren't they pretty?

At the end of chapter 4 I should have had a playable sudoku game.  What I had was a "nifty" error screen as my app crashed.  It turns out that I missed a few characters when typing in the long string that defines the starting position for a game.  It was an easy mistake and should have been easy to find.  I guess my inexperience using Eclipse slowed down finding the problem as I wasn't able to walk the stack backward from the crash to find the bug.  On the whole though getting the Android SDK and development environment setup and running was straightforward.

While I've made a few minor changes, such as the app name, I have followed along with the book.  Though I have a list of things I want to implement for my own version.  Some of them are, in no particular order:
  • Enter puzzles to be solved.
  • Load and save puzzles to local database.
  • Protect the original numbers from modification.
  • Highlight the original numbers when drawing the game board.
  • Allow the user to change colors and fonts used to display the game.
  • Check the board and alert the user when they've solved the game.
That will all have to wait until I finish the book though.  Some of these features might be covered in later chapters.

No comments:

Post a Comment