Gameplay in HTML5: Homework #4
app.graphics, which will hold the methods.
- Implement a function
setContext to set a private property referencing the current canvas context.
- Implement functions
fillCircle that do for circles what the built-in context methods
fillRect do for rectangles.
- Do the same for rounded rectangles. Your functions should take the same parameters as
rect plus a radius that indicates the radius of the quarter-circle arcs that form the corners of the rounded rectangle.
In your FreeCell HTML add a background
div before your screen
canvas in that
div. Then use some of the techniques you have learned to create a nice pattern to serve as a background for your game. (Don't use images.)
- Archive your files. E.g.:
tar -czvf Gameplay_4_MyName.tgz files
(Please do not include jquery.js or modernizr.js files in the archive. Links are OK.)
E-mail the archive to the instructor.