Jump to content
  • entries
    404
  • comments
    202
  • views
    15,293

Whack that O!


So I think I finally got the Whack-an-O game done now. I had to get rid of the high score thing because there's more than one game now and I can't display the high score for both of them. Also appearing in the Whack-an-O game are Xs. If you whack an X the game is over. You only are supposed to whack Os.

xvso31.png.a627c6215e6e85fb35c04b05a348bbe9.png

So I centered the score on the screen since there's only one score and not the high score as well. Not to worry, the tic-tac-toe game still has a win counter for both x and o.

I had a hard time trying to get the X to appear in all 8 spaces. It refused to go in the top one for no apparent reason. But after a few hours of attempting, I think I finally got it to work without repeating a certain pattern over and over, which was another problem I was having.

And yet another problem I was having was when, say, o pressed left and then an x appeared in the same spot the game ended and you were left wondering why. The solution to this was make the letters not repeat the spaces they were in in the previous appearance. So after you whack an O, you can't whack an X because it won't appear in that same spot.

You also may be wondering why there's no center spot. Originally I was going to have ACTION button whack the O in the middle but then I thought that would be 9 spaces. 8 is a better round number computerwise (2^3) and therefore would be easier to get a random number for. In learning how to code for all these different retro consoles, they all have one thing in common: They like numbers that are powers of 2.

I also began work on this this morning and now I think I have completed it, which is pretty quick even for me. It's only about 2 p.m. I woke up at about 5 a.m. or so. In order to get my (apparently needed) 14 hours or so of sleep, I will probably get sleepy and will be headed to bed here pretty soon.

0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...