Write programs to play a card game

Assignment Help C/C++ Programming
Reference no: EM13833903

In this assignment, you will write two programs to play a card game ("clubs"). A separate document describing the rules of "clubs" will be provided.The first program (clubber) will listen on its stdin for information about the game and give its moves to stdout.The program will send information about the state of the game to stderr.The second program (clubhub) will start a number of processes (eg clubber) to be players and communicate with them via pipes. The hub will be responsible for running the game (sending information to players; processing their moves and determining the score). The hub will also ensure that, information sent to stderr by the players, is discarded.

Your programs must not create any files on disk not mentioned in this specification or in command line arguments. Your assignment submission must comply with the C style guide (version 2.0.2) available on the course blackboard area. This is an individual assignment. You should feel free to discuss aspects of C pro-gramming and the assignment specification with fellow students. You should not actively help (or seek help from) other students with the actual coding of your assignment solution. It is cheating to look at another student's code and it is cheating to allow your code to be seen or shared in printed or electronic form.

You should note that all submitted code may be subject to automated checks for plagiarism and collusion. If we detect plagiarism or collusion, formal misconduct proceedings will be initiated against you.

A likely penalty for a first o

ence would be a mark of 0 for the assignment. Don't risk it! If you're having trouble, seek help from a member of the teaching sta

Don't be tempted to copy another student's code.

As with Assignment 1, we will use the subversion (svn) system to deal with assignment submissions. Do not commit any code to your repository unless it is your own work or it was given to you by teaching staff. If you have questions about this, please ask.

Functionality

Provided that your code compiles (see above), you will earn functionality marks based on the number of features your program correctly implements, as îutlined below. Partial marks may be awarded for partially meeting the functionality requirements. Not all features are of equal difficulty. If your program does not allow a feature to be tested then you will receive 0 marks for that feature, even if you claim to have implemented it. For example, if your program can never open a file, we can not determine if your program would have loaded input from it. The markers will make no alterations to your code (other than to remove code without academic merit). Your programs should not crash or lock up/loop indefinitely. Your programs should not run for unreasonably long times.

• (Player) argument checking

• (Player) correctly handles early hub loss and "end" message

• (Player) Correct choice for initial move

• (Player) Correctly handle one round

• (Player) Correctly handle complete game

• (Player) Detect invalid messages

• Hub argument checking

• Detect failure to start players

• Correctly handle players which close early

• Correctly handle 2 player games using a single deck

• Correctly handle invalid messages / invalid plays

• Play complete games with 2 players

• Play complete games with 3 and four players

• Correctly cleanup still running subprocesses on exit

The items marked (Player) indicate that the player will be tested independently of the hub (so the hub does not need to be working in order to get these marks). Keep in mind that tests of complete games may use varying numbers of deck in the deckfile.

Style

If g is the number of style guide violations and w is the number of compilation warnings, your style mark will be the minimum of your functionality mark and:

8 x 0.9g+w

The number of compilation warnings will be the total number of distinct warning lines reported during the compilation process described above. The number of style guide violations refers to the number of violations of the current C Programming Style Guide. A maximum of 5  violations will be penalised for each broad guideline area.

The broad guideline areas are Naming, Comments, Braces, Whitespace, Indentation, Line Length and Overall. For naming violations, the penalty will be one violation per offending name (not per use of the name) up to the maximum of five. You should pay particular attention to commenting so that others can understand your code. The marker's decision with respect to commenting violations is final - it is the marker who has to understand your code.

To satisfy layout related guidelines, you may wish to consider the indent(1) and expand(1) tools. Your style mark can never be more than your functionality mark - this prevents the submission of well styled programs which don't meet at least a minimum level of required functionality.

Attachment:- Assignment.rar

Reference no: EM13833903

Questions Cloud

How mark keating found the sequence of the human herg : Explain how Mark Keating found the sequence of the human HERG cDNA sequence. Make sure to explain how cDNA libraries were constructed and screened to find the unique clone - Explain how the inward rectifying potassium channel cDNA sequence was fou..
How would you explain its metabolic control : A young student was troubled by the idea that a bacterium is able to control its diverse and complex metabolic activities, even though it lacks a brain. How would you explain its metabolic control
Structuring problems of risk in mining and transporation : Structuring problems of risk in mining and transporation
Conduct some background research on the business : Sunshine Café has provided you with some market research and two main goals for your public relations program. However, you will need to conduct some background research on the business.
Write programs to play a card game : You will write two programs to play a card game ("clubs"). A separate document describing the rules of "clubs" will be provided.The first program (clubber) will listen on its stdin for information about the game and give its moves to stdout.
Prepare information about concepts of value proposition : The practice of reflective writing will be introduced in this first assessment task. In this assessment you will be asked to prepare information for a business audience about the concepts of the value proposition and exchange.
What purpose does a strategic vision serve : A well-conceived strategic vision helps prepare a company for the future. True or false? Explain and justify your answer. Explain why an organization needs a strategic vision. What purpose does a strategic vision serve?
Which option should terim recommend : Which option should Terim recommend
Explain why it is or is not a good fit using marketing mix : Will these products fit with his existing market? Explain why it is or is not a good fit using marketing mix terminology Then go into Tim's Coffee Shop and look at the menu board and see if you have any recommendations for better signage.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Ansi-c program complete assignment as per written in the

complete assignment as per written in the attachment

  Write a function that takes two point arguments

Write a function that takes two POINT arguments and returns the midpoint between them and define a function distance() that takes two POINT arguments and returns the distance between them.

  Program to remove comments from the program

A C++ program that asks the user to enter a name of a file containing a C++ program - Program reads the file and produces an output that deletes all comments beginning with // and comments between /* */

  Write the definition of the member function two of yclass

Write the definition of the member function two of yClass so that the private member variable a is initialized to the value of the first parameter of two, and the private member variable b is initialized to the value of the second parameter of two..

  Simulate a game of blackjack

Design and implement a C++ program to simulate a game of Blackjack between two to four players. Your program must incorporate a two-dimensional array to represent the suit and the value of each card dealt to a player

  Shows the effect of the preceding statements

The following program shows the effect of the preceding statements.

  A program that takes into account a pre given array

Problem: A program that takes into account a pregiven array and prompts the user to enter a return per minute value.

  Create the need matrix

Creating a system having five process from p0 to p4 and five resource types.

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

  Write c++ statements that remove all the items

write C++ statements that remove all the items from storeBag and place them into one of two new bags, as follows: Place all occurrences of bread and eggs into fragileBag, and all other items into groceryBag.

  Write the two redox half-reactions

How would I write the two redox half-reactions for these: Ag/Ag+| | H+/H2 Cu/Cu2+| | H+/H2 H2/H+| | Zn2+/Zn

  Write and test a c function named flow that returns both

fluid following in a pipe flows in a smooth pattern knows as laminar flow or a turbulent pattern know as turbulent

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