Connect 4 game application, JAVA Programming

This assignment is a good project for working with 2 dimensional arrays. In this program, you will implement an ascii version of the classic game "Connect 4".

Connect 4 is a 2 player game played on a 7 rows by 6 columns vertical grid of squares. Each player takes turns inserting colored disks (checkers) into the top row of the grid. When inserted, a disk falls until it hits the bottom of the grid or another disk that was inserted previously. The object of the game is for a player to place 4 disks in a row, either horizontally, vertically or diagonally. The game ends when either player achieves victory, or if there are no more open squares, in which case the game is a draw.

Instructions

1. Write a console (command line) application that will allow two players to play connect 4.

2. Your program should present the players with an ascii playing board, and allow the players to press number keys to determine which column they want to insert a disk into. When a player makes a move, print a bunch of newlines, and then print the updated board.

3. Be sure to handle illegal inputs properly, including letter presses, or pressing numbers that are out of range, and not allowing input in columns that are full.

4. Print your name as part of the board layout.

5. When a game is over, allow the players to decide whether they want to quit or start a new game, rather than just ending.

6. Optional features: Keep a running total of how many games each player has won since the start of the program. Ask the users to enter their names when the program starts. Include the names of the users in your prompts and board layout.

Assignment checklist:

  • Write a Connect 4 console program.
  • Make sure the program handles horizontal, vertical and diagonal wins by either player.
  • Make sure the programs compile and run from the command line without modification.
  • Include your source and executable files in your turnin.
  • Zip all of your files in a SINGLE .zip file and turn it in to the D2L dropbox.
Posted Date: 2/19/2013 4:35:23 AM | Location : United States







Related Discussions:- Connect 4 game application, Assignment Help, Ask Question on Connect 4 game application, Get Answer, Expert's Help, Connect 4 game application Discussions

Write discussion on Connect 4 game application
Your posts are moderated
Related Questions
The ' is a ' relationship is used with inheritance and ' has a ' relationship is used with composition . Both composition and inheritance allow you to perform sub-objects in

Want a ANTI Iframe Breaker Project Description: I want an ANTI Iframe Breaker code made, so that if I'm iframing a site, that contains JavaScript, flash or otherwise, to forc

iPhone /Android app implemented on a website Project Description: I need someone to implement an iPhone/Android app onto a website page, So users can be able to use the Ap

Ask1. Storing the Array: Write an application that uses an Array to store 10messages of type String. You will store this Array with 10 messages of your choosing. For example, a mes

What is Constructor? A constructor is used to initialize a newly created object. It's called just after memory is allocated for the object. It can be used to initial


Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the pa

List the keywords which are used in java 1.1? The list of keywords which are used in java 1.1 are given below: Keyword Purpose boole

Consider the following Java definition of an integer list class. class IntegerList { private int[] list = new int[200]; private int size = 0; public boolean append(int value) {

How we Use a Car object in a different class ? class Car { String licensePlate; // e.g. "New York 543 A23" double speed; // in kilometers per hour double maxSpeed;