Implement the connect four game

Assignment Help Other Subject
Reference no: EM131887543

Homework - Connect 4

Connect Four is an absorbing and challenging game of vertical strategy that's easy to learn and fun to play. Rules are simple. Each player tries to build a row of four playing pieces in the frame - horizontally, vertically, or diagonally - while trying to prevent his opponent from doing the same.

Game objective - Be the first player to get four of your checkers in a row - horizontally, vertically or diagonally.

Game Rules -

1. Choose who plays first.

2. Each player in his turn drops one of his checkers down any of the slots in the top of the grid.

3. The play alternates until one of the players gets four checkers of his colour in a row. The four in a row can be horizontal, vertical, or diagonal.

4. The first player to get four in a row wins.

5. If the board is filled with pieces and neither player has 4 in a row, then the game is a draw.

Your Task - Implement the connect 4 game. Two users would play the game;

Choose 'X' and 'O' instead of the black and red checkers

Ask the user to input the column on where he wants to insert his checker

  • Check if this move is valid?
  • If the move is valid check if this move can make the user win

Alternate between the two users.

Reference no: EM131887543

Questions Cloud

Compare and contrast induction and deduction : Compare and contrast induction and deduction. Describing how you understand the contribution of each to the scientific method. Provide examples of each
Explain the applicability and issues concerning the article : Use industry websites such as Hollywood Reporter, Forbes, Variety, Studio Daily and Wall Street Journal.
Emotional expressions of dogs : The expression of the emotions in man and animals. In it, Darwin meticulously described the emotional expressions of dogs and other animals.
Child ability to understand others : Could excessive screen time hurt a child's ability to understand others' emotional cues?
Implement the connect four game : Connect Four is an absorbing and challenging game of vertical strategy that's easy to learn and fun to play. Implement the connect 4 game
What are the challenges associated with apple decision : Please read the WSJ article posted and respond to the following questions.This assignment does not have a minimum word requirement.
Show the eventual conditioned behavior : Who was Ivan Pavlov and how did he "discover" what is now known as Classical Conditioning? As part of this answer, be sure to fully detail
Develop a banking application using the account hierarchy : Develop a polymorphic banking application using the Account hierarchy you created. Using a foreach loop, iterate over each account in the array.
Relationship between alcohol consumption and academic : Post a short scenario that represents a correlational study that seeks to investigate the relationship between alcohol consumption and academic performance.

Reviews

Write a Review

Other Subject Questions & Answers

  Statement for an argument for change

Include your thesis statement for an argument for change in your  workplace, and identify at least three search terms you can use in the Internet search engine to find sources to support that thesis statement.

  Myths related to exercise

List 3 myths associated with exercise and explain why each myth is not true. What are 3 options for ensuring your exercise regularly other than belonging to a gym?

  Concept of least restrictive environment

How does this fit with the concept of least restrictive environment - what accommodations are made for the student with the hearing impairment in this general education classroom?

  Define the functions and role of law in business

Define the functions and role of law in business and society. Discuss the functions and role of law in your past or present job or industry.

  What did you learn from reading the given article

Do you agree with the ideas in this article? Why? Why not? What did you learn from reading this article and how might you apply it?

  Support the development of literacy and oral language

In consultation with your teacher, design your own NUMERACY learning resource that could be used to assist TWO (2) or more students in a numeracy activity.

  Graph the production possibility frontier

Graph the production possibility frontier of both countries with computers on the horizontal axis and automobiles on the vertical axis

  This assignment is an analytical essay that requires a

sourcesbullthis assignment is an analytical essay that requires a serious research inquiry and the use of primary and

  Conduct research on behalf of a client-library assignment

One of the firm's lawyers has asked you to conduct research on behalf of a client. The client is the victim of a sexual assault and did not report the event to the police. The client wants to know if she can sue the offender, and if so, for what can ..

  Implement the project and evaluate the project

Choosing and specifying a product design for the project, you have now been allocated resources to continue with the proposed project

  Anne of green gables by lucy maud montgomery-book review

Write a book review on “Anne of Green Gables by Lucy Maud Montgomery”, Publication: Broadview Press , Number of pages: 401, Year published: 2004

  What developmental theories will guide your universal design

With these goals in mind, discuss how you would develop a universal design for a classroom that takes cultural diversity into consideration. What strategies would you include? What developmental theories will guide your universal design? Ethical c..

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