Connect 4 game application, JAVA Programming

Assignment Help:

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.

Related Discussions:- Connect 4 game application

Give an example of code using static and finalize, Give an example of code ...

Give an example of code using static and finalize Example Code: using static & finalize () We want to count exact number of objects in memory of a Student class the one de

Just i can told u looking for that for 6 mounth help me plea, how can i add...

how can i add script code in anouncement of a channel in a massneger the massnegr suport that but do not published it please help me please:((((((((((((((((((((((((((((((((((((((((

Website for swapping and selling books, Website for swapping/selling books ...

Website for swapping/selling books Project Description: Seeking a website where students can sell and buy books. I want them to swap books as well. Payment options are requir

I need basic mobile app, Project Description: Android app for particular...

Project Description: Android app for particular needs children Provide the fonts, layouts and images of the app. Functions: home screen: main page that links to 'login'

Can a class implementing a remote interface, Can a class implementing a Rem...

Can a class implementing a Remote interface have non remote processes? Ans) Yes. Those processes behave as normal java process operating within the JVM.

Give a example of using tostring() methods, Give a example of Using toStrin...

Give a example of Using toString() Methods ? Below is a version of CarTest in which uses toString() and System.out.println() instead of printing the fields in a straight line

Explain the equals() method, Explain the equals() method The equals() m...

Explain the equals() method The equals() method of java.lang.Object acts the similar as the == operator; that is, it tests for object identity rather than object equality. The

What types of new jobs are created because of computing, What types of new ...

What types of new jobs are created because of computing? And that old professions are being eliminated? Because of computing whereas people are getting benefits from automated

How instant messaging works explain their process, How instant messaging wo...

How instant messaging works? Write the steps involved in this process? The Instant Messaging services available permit us to manage a list of people (contacts) that we interact

Explain any five buzz words in java, Question 1 Explain any five buzz w...

Question 1 Explain any five buzz words in Java 2 Explain exception classes and also explain common exceptions in java 3 Explain primitive and abstract data type in java

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd