HTML and CSS Reference
In-Depth Information
Function
Invoked By/Called By
Calls
drawback
Invoked as the draw method for a
card in makedeck and flipback
Polycard
Called in choose
shuffle
Called in init
makedeck
Called in init
Card
Called by makedeck
drawpoly
Called as the draw method of
Polygon in choose
Table 5-2 shows the commented code for the complete polygon version of the application. When reviewing
it, think about the similarities to applications described in other chapters. And remember that this
illustrates just one way to name the applications components and program it. Other ways may work
equally well.
Whatever programming choices you make, put comments in your code (using two slashes per line: //) and
include blank lines. You don't need to comment every line, but doing a decent job of commenting will serve
you well when you have to go back to your code to make improvements.
Table 5 - 2 . Complete Code for the Polygon Version of the Memory Game
Starting html tag
<html>
<head>
Starting head tag
<title>Memory game using polygons</title>
Complete title
element
Starting style tag
<style>
form {
Specify styling for
the form
width:330px;
Set the width
margin:20px;
Set the external
margin
background-color:pink;
Set the color
 
Search WWH ::




Custom Search