26. Finish him!

If you’ve never played “Mortal Kombat” then apologies for the title of this lesson. What remains to be completed in this program, however, involves nothing we haven’t already covered. You now have all the skills required to create a fully functioning version of Tic Tac Toe! I understand that that prospect might seem intimidating so I’ve provided a few tips below that will provide some assistance:

The Other Eight Tic Tac Toe Buttons
You may have already realised that the code we’ve been working on is correct for just the first of the Tic Tac Toe buttons. This means once you’ve completed it, you will basically need to copy and paste it and make minor alterations for it to work in all the other button click events as well…this repetition probably gets you pondering whether there’s a more efficient solution…that’s for another tutorial!

The Computer’s Turn
Don’t be intimidated by this. Think about how you would play the game and try and work out how the computer would have it’s turn. You will need to check for blank squares obviously and even if your code just finds the first blank square to place it’s “zero” at this stage, that’s a good start!

The Quit Button
So how do you quit a Visual Basic application? By simply putting the word “End“. How simple is that :-)

And now you’re ready to go on alone. Everything you need to complete this project has been covered in these 26 lessons so feel free to go back over them, study your code or ask questions in the comment sections of any lesson. Do some experimenting and see how you go…you’re well and truly immersed in the world of programming now!

Leave a Comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>