Program with ascii version of the classic game

Assignment Help Basic Computer Science
Reference no: EM13829805

Problem:

This question is about working with 2 dimensional arrays. In this program, you will implement an ascii version of the classic game "Connect 4".

Connect 4 is 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.

Additional Information:

This problem is from Computer Science, particularly to Java programming. The question here is about writing the program with ascii version of the classic game Connect 4. Connect 4 is a game which can employed for best demonstrating 2 dimensional arrays. The solution has all the coding.

Reference no: EM13829805

Questions Cloud

Explain how interest groups try to directly influence : Explain how Interest Groups Try to Directly Influence the Passage
Write essay detailing your interpretation of all the data : Submit a three page essay detailing your interpretation of ALL the data you have collected so far, rendering tentative conclusion as to your strengths and weaknesses. Be sure to draw on insight in Kellerman and Quinn et al. text
The elasticity of demand at the price : Sandy wiches sells fresh sandwiches at a beach location, management has determined that on a typical day, demand can be described by the following equation: Qd = 1200 - 200Px if p = $3.00, determine the number of sandwiches sold and the elasticity of..
Explain the proliferation of political interest groups : Explain the Proliferation of Political Interest Groups in the 1960s in the United States
Program with ascii version of the classic game : This question is about working with 2 dimensional arrays. In this program, you will implement an ascii version of the classic game "Connect 4".
Waiting line situation-Poisson and exponential distributions : In a waiting line situation, arrivals occur around the clock at a rate of six per day, and the service occurs at one every three hours. Assume the Poisson and exponential distributions.  Find average time in the waiting line.
Why are large public interest groups most likely : Why are Large Public Interest Groups Most Likely to Suffer from a Free-rider Problem
Preparing simple er diagram or schema : Composite and multi-valued attributes can be nested to any number of levels. Suppose we want to design an attribute (one attribute) for a STUDENT entity type to keep track of previous college education.
Compensation-net present value-internal rate of return : Determine how much compensation (return) you expect to earn and how long will it take to pay back the return on this investment. Use the financial formulas, Net Present Value (NPV), Internal Rate of Return (IRR), and Payback.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  A large geographic region

A company that has 5,000+ users across a large geographic region

  Assignment related to mcqs

Which one of the following is a correct SELECT clause in a VBScript program for selecting the fields: FirstName and LastName and Age? SELECT FirstName and LastName and Age, SELECT FIELDS(FirstName,LastName,Age, SELECT FirstName,LastName,Age, SELECT..

  Describe the relationship that controls and audits

Take this opportunity to describe the relationship that Controls and Audits have. Describe what policies, processes, standards, procedures and guideline are and how they each are involved with compliance.Why do you think they are important?

  For the purpose of this assignment you will have to recap

For the purpose of this assignment, you will have to recap your previous assignment (in 250 words) and then provide a well-researched and informed report to the CIO.

  Mobility, cdma, and gsm

In a paper of at least two pages (excluding the title and reference pages), discuss a minimum of three mobile web applications that are familiar or that you use regularly. Describe the differences between CDMA and GSM. Discuss how CDMA and GSM suppor..

  Which must be populated in the code-behind file

which must be populated in the code-behind file. The values of the new controls must be output when a postback is done.

  Develop an i/o port decoder

Using a PLD, develop an I/O port decoder that generates the following high-bank I/O strobes: 300DH, 300BH, 00B6H, and 00EEH.

  User interface design

You are the lead human-computer interaction (HCI) engineer on a major design project for an organization of your choice. Employees or customers will use this new system and user interface (UI) design to perform data entry for the organization.

  How digital media has been used to influence

How digital media has been used to influence

  Use a single if statement and boolean operators

Write a program that asks the user for a year and computes whether that year is a leap year. Use a single if statement and Boolean operators.

  Document for a information system transformation

4-6 pages Business Requirements Document for a Information System Transformation for a law firm and two other agencies a Security Firm; Investigation Firm all have seperate data base; I have to come up with how to create a centralized database

  Different types of switching used in data transmission

Compare or contrast the different types of switching used in data transmission. How many are there? What factors separate one from the other? Please elaborate.

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