Methods
checkMark(canvas)
Apply visual changes on paired elements.
- Source:
Apply visual changes on paired elements.
Parameters:
Name | Type | Description |
---|---|---|
canvas |
HTMLCanvasElement | Set a pair as found. |
hasPair(canvas) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
canvas |
HTMLCanvasElement | Canvas element to be checked. |
Returns:
If given canvas has already a known pair.
- Type
- boolean
arePairs(state) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
state |
Array | Holds info object for both open cards. |
Returns:
Are both canvas in given state pair or not.
- Type
- boolean
getImage(canvas) → {HTMLImageElement}
find image of given canvas.
- Source:
find image of given canvas.
Parameters:
Name | Type | Description |
---|---|---|
canvas |
HTMLCanvasElement | image of the given canvas. |
Returns:
Image for the given canvas.
- Type
- HTMLImageElement