a2 - CS 136 Assignment 2 Final 100114.2 Revision 1 score...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 136 Assignment 2 Final 100114.2 Revision 1: score should be 'undefined if no games have been played Revision 2: added bonus question Due Thursday, January 21 at 22:00 sharp. No late marks will be awarded. All work must be submitted to the Marmoset submission system . See the preamble of assignment 1 for more information. Assignment 2 Problem 1. 15 Marks. File: simon.ss Modify the implementation of simon.ss (the "Simple Simon" game developed in lectures 2 and 3) to compute a score for each game, defined as follows: score = (2 * correct_presses ) - maximum_presses . We define correct_presses to be the number of correct calls to (press) made by the player, and maximum_presses to be the number of calls to (press) needed to win the game. For Simple Simon (but not the full Simon game in later problems), maximum_presses = n , the size of the game. Your module simon.ss should provide (in addition to simple-simon and press ) a function (score) which produces the score of the immediately previous completed game. If no game has been played, it should produce 'undefined. For example, you might test your implementation with the following interaction: Welcome to DrScheme, version 4.2.3 [3m]. Language: Module; memory limit: 128 megabytes.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

Page1 / 3

a2 - CS 136 Assignment 2 Final 100114.2 Revision 1 score...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online