Assignment Task
Task
- a decoding board, with a shield at one end covering a row of four large holes, and a set of rows containing four large holes next to a set of four small holes.
- code marbles of six different colours (Red, Green, Blue, Yellow, White, Black) are used to represent a code and placed in the large holes on the board; and
- key pegs, some coloured black, some white, are for providing feedback on the guessed code placed in the small holes on the board.
-
- Played between two players in a board game, one player becomes the codemaker, the other the codebreaker.
- The codemaker chooses a code, a pattern of four code marbles. Duplicates are allowed depending on player choice, so the player could even choose four code marbles of the same colour. The chosen code is placed in the four large holes covered by the shield, visible to the codemaker but not to the codebreaker.
- The codebreaker tries to guess the code, in both order and colour, within a certain number of attempts (e.g., 10 in the picture above). Each guess is made by placing a row of code marbles on the decoding board. Once placed, the codemaker provides feedback by placing from zero to four key pegs in the small holes of the row next to the guess. A black key peg is placed for each code marble from the guess which is correct in both colour and position. A white key peg indicates the existence of a correct colour code marble placed in the wrong position.
- If there are duplicate colours in the guess, they cannot all be awarded a key peg unless they correspond to the same number of duplicate colours in the hidden code. For example, if the hidden code is white-white-black-black and the player guesses white-white-white-black, the codemaker will award two black key pegs for the two correct whites, nothing for the third white as there is not a third white in the code, and a black key peg for the black. No indication is given of the fact that the code also includes a second black.
- Once feedback is provided, another guess is made by the codebreaker; guesses and feedback continue to alternate until either the codebreaker guesses correctly, or the number of incorrect guesses reach the number of attempts allowed. If the code is not guessed correctly within the number of attempts allowed, then the shield is uncovered to reveal the code.
- The following video clip may be also helpful to understand the concept: https://www.youtube.com/watch?v=wsYPsrzCKiAThe Assignment Task Specification
- As a text-based application software, WoM will use a command line interface where users type in a command or input and the relevant output is printed onto the screen in text. When the software is executed, it will show a greeting message and a list of commands, followed by a command prompt ‘>’ indicating the system is ready to take user’s input. At the prompt, users can give one of the following commands:
- r: register a new user, which will create a new user
- s: show the score board, which will print the list of the users and their scores
- p: play a game, which will start a new game
- q: quit, which will quit the application
- For registering a new user, the system will ask for the name of the new user. The username is not allowed to be changed after being registered, and also the name must be unique (i.e. not allowed to have the same name as an existing user). A new user will always start with a score of 0 point.
- Below is an example of the output on the screen (user’s input in bold italic).
- Welcome to the World of Mastermind!
- Developed by Alan Turing
- COMP 1048 UO Object-Oriented Programming
- What would you like to do?
- (r) register a new user
- (s) show the score board
- (p) play a game
- (q) quit
- > r
- What is the name of the new user?
- > Alan
- Welcome, Alan!
- What would you like to do?
- (r) register a new user
- (s) show the score board
- (p) play a game
- (q) quit
- > r
- What is the name of the new user?
- > Alan
- Sorry, the name is already taken.
- What would you like to do?
- (r) register a new user
- (s) show the score board
- (p) play a game
- (q) quit
- > r
This IT Assignment has been solved by our IT Experts at onlineassignmentbank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment Experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.