HTML and CSS Reference
In-Depth Information
top: 240px;
z-index: 999;
background: url(images/undo_btn.png) no-repeat;
width: 90px;
height: 26px;
}
#undo-button:hover {background-position: 0 -26px;}
7. Also, we add mouse-related styling to the patern's slot:
.pattern-slot:hover{outline-color: #D68700;}
.pattern-slot:active {outline-color: #BC7702;}
Objective complete - mini debriefing
The selecion is done by the click event on the patern. Basically, we get the patern ID from
the data- atribute. Once the patern ID is known, it triggers the following method:
game.compositionView.selectPattern(pattern);
Then, the composiion pushes the selecion into an array.
Undo the player composition
We trigger the undo logic by listening to the undo buton's click event. Then, the undo logic
removes the last patern from the array. At the same ime, we ind the last patern element
in the composiion view and move this element to the patern deck.
Comparing the player and
compositions of the quest
In this task, we create logic to make mulilayered patern composiions from player's selecion
and then compare it with the quest patern's composiion.
Prepare for lift off
We need a way to represent the patern overlapping and non-overlapping relaionships.
Representing a pattern overlapping relationship
We will use the data structure of this secion to remember the overlapping relaionship.
Most paterns will overlap others, so we would need to think the other way round. So, we
store those paterns that do not overlap together.
 
Search WWH ::




Custom Search