

pl1 & pl2: are used to hold the names to be displayed in status strip.rnd & turn: are used to generate random number and to toggle comp player mode.diff and vs: are used to identify difficulty level and game mode selected by the user.a, b, c, d: are the integers to hold the co-ordinates of the second last and last move respectively, used by computer player logic.In array, the values are used instead of letters. val: is a value corresponding to the letter.cnt: is a counter to track the number of moves played.pos: is a two dimensional array to represent the nine blocks as the operations are easy to perform on an array.First, the variables used are explained as below: Simple labels are used for display of the nine blocks involved, and corresponding code to be executed is triggered through click event of them. This program is my attempt to demonstrate the same to beginners in programming.įor ease of learning, the program is divided into modules which are represented as functions in the program. Backgroundĭuring my exploration of Java and C#, I found some interesting similarities and differences and ultimately learned that with study of one of them, the other one can also be learned.

It can be run anywhere where JRE is installed. It has a built in Computer Player module and can be even played in two player mode. This is a program for Tic Tac Toe game written in C#.
