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

  Business intelligence and data warehouses

Business Intelligence and Data Warehouses

  Explain at least one 1 possible effect that multithreading

question 1 describe at least one 1 possible effect that multithreading could have on event-driven programming when you

  What are the benefits of creating a modular design

What are the benefits of creating a modular design for a large computer program? Why would one extremely large program not be the best choice for a quality program design?

  Explain how they might be avoided

when is compaction of secondary storage beneficial from the file managers perspective? give several examples. list some problems that could be presented as a result of compaction and explain how they might be avoided.

  The fourth floor is currently occupied by another tenant

Imagine that you have been hired as a contractor by a local business that has recently purchased new office space for its growing business. Design a network for the local business based on the following information: The business has approximately fif..

  How effective leader can manage changes for new technology

Write down separate 350-word document which explains how the effective leader can manage changes implementing this new technology might need.

  For this assignment we will focus on different tools and

for this assignment we will focus on the various tools and techniques available to the security professional in order

  Create an incident-response policy

Create an incident-response policy that covers the development of incident-response team, disaster-recovery processes, and business-continuity planning.

  What does this value indicate

The value of the Destination Address in a given Ethernet frame contains ff:ff:ff:ff:ff:ff. What does this value indicate?

  Find some articles or research on project management

Do the same for key points that make project management easier for an Agile project.

  How do you think that freedom of expression impact

How do you think that Freedom of expression impact

  Modify the test scores program from the above debug

Also print a report of the each student's test grades, average and final grade as a table, and then print the averages of each Test and overall Test Average, as well as highest Test Grade of all Tests and the student with the highest class grade.

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