Click here to Skip to main content
6,596,602 members and growing! (19,058 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » Game Development » Games     Intermediate

A simple Visual Basic Version of Tic Tac Toe in 2 and 3 Dimensions

By Jeff Arrington

A Tic Tac Toe game in 2D and 3D. The kids will enjoy.
VB.NET 1.1, Win2K, WinXP, Win2003VS.NET2003, Dev
Posted:19 Apr 2004
Views:85,069
Bookmarked:14 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
23 votes for this article.
Popularity: 3.37 Rating: 2.47 out of 5
6 votes, 26.1%
1
3 votes, 13.0%
2
7 votes, 30.4%
3
1 vote, 4.3%
4
6 votes, 26.1%
5

Sample Image - Arrington_s_Tic_Tac_Toe.jpg

Introduction

This is just a simple Tic Tac Toe game. I've included a Rules Word Doc for anyone who doesn't know the rules, but let me just go ahead and save you the time:

  • If you are X's then get three X's in a row
  • If you are O's then get three O's in a row

Note that, with 3D, it will show all possible winning combinations if applicable. See picture above.

Pretty confusing stuff huh....ha ha.

This was a class assignment, well at least, just the 2 dimensional part of the program. I went a little over board and did 3D also. It really wasn't that difficult, it was just a lot more extra checking. Basically, you just add each move into an array and check for appropriate winning combinations after every turn. I've added comments in the source code, so it is relatively easy to follow. Hope you enjoy the game.

It's a fun kid's game. You can change the code very simply to personalize it for two people so that it will show the name of the winner. Kids like to see their name on the PC.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Jeff Arrington


Member
Jeff is currently a Graduate student in the Computer and Information Sciences department at East Tennessee State University. He enjoys programming for fun and a challenge. He is currently researching video edge detection for use in Home Automation applications.
Occupation: Web Developer
Location: United States United States

Other popular Game Development articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 7 of 7 (Total in Forum: 7) (Refresh)FirstPrevNext
GeneralChecking Winner C++ Pinmemberflavio.rodriguez22:00 31 Aug '07  
QuestionWhy not use the e.Graphics object....? PinmemberAbooJch12:43 17 May '07  
Questionhelp tic tac toe in vc++ Pinmemberpeyman1361811:13 14 Jan '06  
AnswerRe: help tic tac toe in vc++ PinstaffChristian Graus13:05 17 May '07  
General2 and 3 Dimensions? PinsussAnonymous8:46 21 Apr '04  
GeneralRe: 2 and 3 Dimensions? PinmemberJeff Arrington9:10 21 Apr '04  
GeneralRe: 2 and 3 Dimensions? PinsussAnonymous20:44 18 Aug '05  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 19 Apr 2004
Editor: Smitha Vijayan
Copyright 2004 by Jeff Arrington
Everything else Copyright © CodeProject, 1999-2009
Web16 | Advertise on the Code Project