Write complete application to play game tic-tac-toe, JAVA Programming

(Tic-Tac-Toe) Create class TicTacToe that will enable you to write a complete application to play the game of Tic-Tac-Toe. The class contains a private 3-by-3 rectangular array of integers. The constructor should initialize the empty board to all 0s. Allow two human players. Wherever the first player moves, place a 1 in the specified square, and place a 2 wherever the second player moves. Each move must be to an empty square. After each move, determine whether the game has been won and whether it's a draw. If you feel ambitious, modify your application so that the computer makes the moves for one of the players. Also, allow the player to specify whether he or she wants to go first or second. If you feel exceptionally ambitious, develop an application that will play three-dimensional Tic-Tac-Toe on a 4-by-4-by-4 board.

Posted Date: 3/29/2013 2:18:10 AM | Location : United States







Related Discussions:- Write complete application to play game tic-tac-toe, Assignment Help, Ask Question on Write complete application to play game tic-tac-toe, Get Answer, Expert's Help, Write complete application to play game tic-tac-toe Discussions

Write discussion on Write complete application to play game tic-tac-toe
Your posts are moderated
Related Questions
Write a program that reads both the girl and boy files into memory using arrays. Then, allow the user to input a name. The program should search through both arrays. If there is

1. In this lab assignment we will be using the vim or emacs editor in addition to the commands we have already learned. Open a shell terminal and create a file named in your home d

I need help setting up and fleshing out a basic outline/structure for a basic Java web app using an MVC pattern

what are Objects and Fields in java

What is the difference between Internet and Intranet ? Intranet and internet are 2 domains which are extremely a like but frequent segregated in order to manage security. Inter

Differentiate between Primitives and Objects Everything in Java is an "Object", as every class by default inherits from class "Object", except a few primitive data t

Question: (a) Describe what is meant by a ‘constructor' in Java. Use a simple example to illustrate your answer. (b) Differentiate between a class method and an instance me

Question 1: a) What is the meaning of an object-oriented programming? b) List eight simple types of data in Java c) Explain how objects and classes are closely related.

Explain Overriding Methods: The Solution The object oriented solution to this problem is to describe a new class, call it SlowCar, that inherits from Car and imposes the additi

Explain the term- Strings A string is generally considered to be a sequence of characters stored in memory and accessible as a unit. Strings in java are signified as objects