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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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