-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
64 lines (63 loc) · 3.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
<title>Colorbreaker</title>
<link rel="stylesheet" type="text/css" href="styles/styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body ng-app="colorbreaker">
<div class="main-body" ng-controller="gameController" ng-class="{'victory': victory}">
<div class="screen-center">
<div class="row-wrapper">
<div class="color-row palette-row ng-cloak" ng-show="activePin">
<div class="color-box"></div>
<div class="color-box palette">
<div class="palette-color" ng-class="'{{color + '-palette-color'}}'" ng-repeat="color in colors" ng-click="selectColor(color)"></div>
</div>
<div class="color-box"></div>
</div>
<div class="color-row" ng-repeat="(index, row) in rows | orderBy:index:true">
<div class="color-box">
<a class="info-icon" ng-click="showHelpModal()" href="javascript:;" ng-if="rows.length === 1">i</a>
</div>
<div class="color-box" ng-repeat="pin in row.pins">
<div class="color-pin" ng-class="getPinClass(pin)" ng-click="index === 0 && pinClicked(pin)"></div>
</div>
<div class="color-box feedback-box">
<a href="javascript:;" ng-show="lastRowIsFilled() && index === 0 && !victory" class="btn-feedback ng-cloak" ng-click="codeMaker.giveFeedback()">✓</a>
<div class="feedback-pin" ng-repeat="feedbackPin in row.feedback track by $index" ng-class="getFeedbackPinClass(feedbackPin)"></div>
</div>
</div>
</div>
</div>
<div class="modal-backdrop ng-cloak" ng-show="victory || showHelp">
<div class="modal-window" ng-show="victory">
<h2>Congratulations, you won!</h2>
<span class="victory-message-tries">Number of tries: {{rows.length}}</span>
<button ng-click="play()">↻ Play again</button>
</div>
<div class="modal-window" ng-show="showHelp">
<h2>Rules of the game</h2>
<p>
The purpose of the game is to find the hidden combination of colors.
After filling a row with colors, feedback is provided, in the form of
black and white circles to the right of the row.
</p>
<p>
Each <b>black</b> dot means that a color in the row <b>exists</b> in
the hidden combination and it's <b>in the correct position</b>.
<p>
</p>
<p>
Each <b>white</b> dot means that a color <b>exists</b> in the hidden
combination but it's <b>not in the correct position</b>.
</p>
<button ng-click="showHelp = false">Got it!</button>
</div>
</div>
</div>
<script type="text/javascript" src="/bower_components/angular/angular.min.js"></script>
<script type="text/javascript" src="/js/app.js"></script>
<script type="text/javascript" src="/js/controllers/gameController.js"></script>
</body>
</html>