Get in touch with us
Send us an e-mail
Question
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.
Summary
The question belongs to Computer Science, particularly to Java programming. The question here is about writing a program with ascii version of the classic game Connect 4. Connect 4 is a game which can used for best demonstrating 2 dimensional arrays. The solution has all the coding.
Total Word Count NA
Download Full Solution
"I knew my research proposal needs to be fantastic to create the first impression. I am a regular client of HelpWithAssingment.com and things worked out fine. Not only did they help me identify the topic but also at the same time they wrote a fantastic research proposal which had impressed my professor very much
I was pursuing my MSN degree when I thought of specializing in musculo-skeletal patients and it was back in 2008 when I came across HwA and learned a lot about the interventions and assessment strategies.
1.: I had used another online accounting assignment help provider earlier for one of my accounting assignments and my professor immediately found out that it was not my work. But with TheReliableTutor and their assignment help experts who are from Singapore itself I have never faced this problem and have been happily using their services for the past two semesters.
When I chose the thesis topic for my economics professor I wanted it to be specific to the economic conditions prevailing in Australia and not just a generic essay. When I contacted HwA and told them of my specific requirement they teamed me up with an economics thesis writing expert who is actually teaching in New South Wales himself. Needless to say that the whole process from the very get go was smooth and excellent.
The motivational strategy case study handed to me by my professor was a bit confusing one. I was not sure how to approach the issue wherein the workers were not dissatisfied with the salary but felt de-motivated due to the high attrition rate. Then I came across a really helpful HRM expert from HwA , who provided a wonderful solution. I got good grades in that assignment and since then I always take their help for my works.
Comments
this is a very good website
I have 50 questions for the same test your page is showing only 28
hi can you please help or guide me to answer my assignments. thanks
hi can anyone help or guide me to my assignments. thanks
This solution is perfect ...thanks
Hello Allison,I love the 2nd image that you did! I also, had never heard of SumoPaint, is something that I will have to exolpre a bit! I understand completely the 52 (or so) youtube videos that you probably watched. Sometimes they have what you want, sometimes they don't! However, it is always satisfying when you are able to produce something that you have taught yourself. Great job!Debra 0 likes
Perfect bank of solution.
great !
thanks for the quick response. the solution looks good. :)
thnx for the answer. it was perfect. just the way i wanted it.
works fine.