You should get started writing your python code as soon as all of you finish your test suite and it passes both the
public and release tests on Marmoset -- do not wait!
A constructor that takes a color, type, width, and height, as arguments, in that order. You may assume inputs will always
be valid, as specified in previous functions. Besides creating attributes for the arguments passed in, the constructor
will create an attribute for softening the number, which it initially sets to
A method called
match that takes a
list as an argument, and tries to see if the incoming list
of tiles matches any number, one through five, of any size from a 3x3 board to a 9x9 board.
If a match is found, it set's the object's width, height, and type (one, two, three, four, or five) to the matched number.
If the number cannot be matched, the method raises an exception, and leaves the object's state untouched. To raise an
exception in python, simply type
raise Exception() (we'll learn more about exceptions later).
See the test cases for examples.
draw method that draws the current object, by passing its arguments to the
written in the previous project, and returns a string.
A to-string method that can be called with
str(...), which returns the color of the number, followed by a
space, followed by the type of the number.