Lecture07-CodeBreaker-part1-3pp

Allowed the codebreaker tries to guess the papern

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: by going through the steps in them remember your best friends? CMPUT174  ­ ­ Design & Problem Solving 7 Ac=vity: Informal Design • Draw a diagram or write out steps for how the program will operate • Do not worry about details or the code you will write • Describe in English or pictures what steps will be included in the program CMPUT174  ­ ­ Design & Problem Solving 8 Example: Codebreaker game • Two ­player game: the codemaker and the codebreaker   The game goes for a number of rounds   The codemaker chooses a paPern of four colored pegs; duplicates are allowed   The codebreaker tries to guess the paPern both in order and color   The codemaker provides feedback a=er each round by saying the number of pegs that are: •  Of the right color and in the right place •  Of the right color but out of place   The game ends if the codebreaker guesses the paPern or runs out of rounds CMPUT174  ­ ­ Design & Problem Solving 9 3 13 ­10...
View Full Document

Ask a homework question - tutors are online