Tuesday, 6 March 2018

CSP1150 | PROGRAMMING PRINCIPLES OF DICE GAME PROGRAM CSP5110 | PROGRAMMING PRINCIPLES

Assignment 1 (Dice Game program)

This is an individual programming assignment.
Value: total value of this assessment is 20% and marked out of 20.

Background information

This assignment will evaluate your knowledge of the ability to implement the programming concepts which have covered in the unit already, containing the usage of variables, data types, input/output, selection, functions, iteration, and data structures. Except all this, it also evaluates your ability to design and then apply a solution to a problem using these concepts.

Overview

You need to design and implement a program that allows the user to play a single-player dice game based loosely on the game ‘Farkle’. The game is played as given below:
a. The game consists of three turns, and the purpose of the game is to score as many as possible
b. Each turn starts with a roll of 6 standard dice
c. Matching dice (two or more of the same number) can be set aside for points, and the remaining dice can then be re-rolled in an attempt to score more points
Points are ‘amount of dice’ number on dice’ for example rolling three 5s is worth 15 points
a. The player chooses whether to set matching dice aside and whether to re-roll remaining dice
b. If the player chooses not to re-roll the dice, the points stored in the turn are added to their score and the turn ends
c. If no dice can be put aside after a roll, the player loses the points the potential points and the turn ends- therefore, the player must decide how far to push their luck with additional rolls
The game includes quite a lot of luck, but there is also a small amount of strategy in choosing whether to set matching dice aside and whether to re-roll the remaining dice.
The completeness of this program can be in fewer than 100 lines of code (although applying CSP5110 requirements or optional embellishments may result in a program longer than this

Program Output Example
As highlighted in the case study of module 5, it’s very important to take the time to appropriately design a solution before starting to write code. However, this task requires you to write and submit pseudocode of your program design along with for the code for the program.
You’ll get a lot more benefit from pseudocode if you actually attempt it before trying to code your program- even if you just start with a rough draft to create the overall structure of the program and then revise and improve it as you work on the code. This back and forth cycle of designing and coding is entirely usual and expected, especially when you’re new to programming.
The requirements detailed on the following pages should give an idea of the program structure that allows you to start on designing your solution in pseudocode.
Since the structure of the program is relatively complicated, a broad overview has been given below:
This is a general overview that only aims to reflect the general structure of the code and the key steps of processing involved. Your pseudocode should be significantly more detailed.
Write a distinct section of pseudocode for each function you explain in your program so that the code for the major part of your program is not cluttered with function definitions. Make sure that the code for each of your functions clearly defines the considerations that the function receives and what the function returns back to the program.
It will help you to think the pseudocode of your program as the content of a book, and the code of functions as its appendices: it should be possible to read and understand a book without necessarily reading the appendices; however they’re there for further reference if needed.

No comments:

Post a Comment

Recent Questions

Learn 11 Unique and Creative Writing Examples | AssignmentHelp4Me

Learn 11 Unique and Creative Writing Examples | AssignmentHelp4Me elp4Meelp4Me