Questions
In C, build a connect 4 game with no GUI. Use a 2D array as the...

In C, build a connect 4 game with no GUI. Use a 2D array as the Data structure. First, build the skeleton of the game. Then, build the game. Some guidelines include...

SKELETON:

Connect Four is a game that alternates player 1 and player 2. You should keep track of whose turn it is next.

Create functions:

  • Initialization – print “Setting up the game”. Ask each player their name.
  • Teardown – print “Destroying the game”
  • Accept Input – accept a letter for which column of the game we are going to drop a disc into. Valid letters are A-G (7 columns). You should designate a letter for “Quit the game”. Input must be returned from this function.
  • Update the state of the world – pass the input data to this function. Since we do not have a “world” right now, choosing “A” is the “winning move”, all other letters make the game continue. This method must not print anything. It only does calculations. Results from here update the “global state.”
  • Display the state of the world – Print the result calculated in the state of the world. Later, this should print the board.
  • Main – call initialization, then loop until a flag is set (game over or a player quit), calling accept input, update and display. Outside of the loop, call teardown.

Make variables to define the size of the board (width and height). These can be global variables. Other global variables might include player names or which player should play next

=====================================================

BUILDING GAME:

  1. We need to allocate the space for the game board. While this is a fixed size board, we will still allocate the space for the board in the initialization function.
  2. Whenever we allocate memory, we need to make sure that we free it as well. Free the memory in the teardown function.
  3. Print the game board in the display the world function. Use one character for an empty spot, one character for the discs for player one and another character for the discs for player two. You may use whatever characters you prefer. You may make the display as complex as you wish so long as we can clearly see what moves are available.
  4. The remainder of the work to be done goes into “update the state of the world.”
    1. We must look through the column of the array and add the new disc into the array in the appropriate location based on the column that the player chose.
    2. We must signal to end the game if the column that the player chose is full.

We must look for 4 discs belonging to one player in a straight line. The line can be horizontal, vertical, or diagonal. When we find this, we must signal end of the game

In: Computer Science

Subject: Cryptography Suppose a system uses a Public-Key Infrastructure with a Certificate Revocation List. A device...

Subject: Cryptography

Suppose a system uses a Public-Key Infrastructure with a Certificate Revocation List. A device in that system is asked to verify a certificate but cannot access the Certificate Revocation List database because of a denial-of-service attack. What are the possible courses of action for the device, and what are the advantages and disadvantages of each course of action?

In: Computer Science

Please visit any company in KSA and collect information on the AIS system followed by the...

Please visit any company in KSA and collect information on the AIS system followed by the company.

1. Explain the AIS system followed by the company

2. The process of its database

3.Final information(Financial Statements)

4.Threats and controlling measures of the system

its ok if you want make it short

In: Accounting

I wish to use a B-type thermocouple to measure a temperature of 16000C. I am using...

I wish to use a B-type thermocouple to measure a temperature of 16000C. I am using 1000C (boiling water) as my reference temperature. What is the emf expected at 16000C ? (Refer to the NIST thermocouple database):

a)

11.233 mv

b.

0.033 mV

c.

11.263 mV

d.

None of the above

In: Mechanical Engineering

A general-purpose database management system (DBMS) has 5 basic responsibilities: Interaction with the file management system...

A general-purpose database management system (DBMS) has 5 basic responsibilities:

  • Interaction with the file management system

  • Integrity enforcement

  • Security enforcement

  • Backup and Recovery

  • Concurrency control

For each responsibility, explain the problems that would arise if the DBMS did not execute these responsibilities. Be descriptive and give examples where appropriate.

In: Computer Science

Discuss various Global HRMS options. Talk about the key considerations in purchasing and maintaining a global...

Discuss various Global HRMS options. Talk about the key considerations in purchasing and maintaining a global HRMS database.

What specific concerns/unique challenges ould you have with the countries in the region that you selected? Be sure to include currency, pay periods / special pays, data privacy issues, etc.

In: Operations Management

In this forum, discuss business rules and how they influence database design. Explain what is data...

In this forum, discuss business rules and how they influence database design. Explain what is data modeling and why data models are important.

Submission Format:

Initial post must be made 2 or more days before the closing date, 5 or more sentences long, must be the correct response as well as thoughtful.

In: Computer Science

Database: Our AD is Movie Theater. Create an ER diagram with the following entities: Staff, Ticket,...

Database:

Our AD is Movie Theater.
Create an ER diagram with the following entities: Staff, Ticket, Movie, Session, Hall, Seat, Director, Actor, Distributor, and Roles. AND also identify the type of relations between the entities with notations and explain why you used it.

**Read the question carefully before you answer**

In: Computer Science

PLEASE DO THIS IN C#.In 1789, Benjamin Franklin is known to have written “Our new Constitution...

PLEASE DO THIS IN C#.In 1789, Benjamin Franklin is known to have written “Our new Constitution is now established, and has an appearance that promises permanency; but in this world nothing can be said to be certain, except death and taxes.” Our federal tax system is a “graduated” tax system which is broken into seven segments. Essentially, the more you make, the higher your tax rate. For 2018, you can find the tax brackets here. Your task is to design (pseudocode) and implement (source code) a program that asks the user for a salary and calculates the federal tax owed. Note, that only the money above a particular tax bracket gets taxed at the higher rate. For example, if someone makes $10,000 a year, the first $9525 gets taxed at 10%. The “excess” above that ($475) gets taxed at 12%. Note: work through at least three (3) examples of this by hand before designing the code. It will save you significant time. Still having problems? Have you talked to a GTA recently? Sample run 1: Enter your salary to the nearest dollar: 2000 Total tax owed is: $200

In: Computer Science

discuss how moulded tiles on composite materials are manufactured, especially polypropylene(Pp) tiles (2000 words)

discuss how moulded tiles on composite materials are manufactured, especially polypropylene(Pp) tiles (2000 words)

In: Mechanical Engineering