-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
78 lines (71 loc) · 3.95 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Master Mind Guess Number</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link href="css/style.css" rel="stylesheet" type="text/css" >
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-app="masterMindApp">
<div ng-controller="MasterMindController as ctrl">
<div class="container">
<div class="row">
<h3 class="app-title">Master Mind Guess Number</h3>
<!-- Main Menu-->
<div ng-if="ctrl.home == true">
<button ng-click="ctrl.startGame()" class="start-game">Start</button>
<br/>
<button ng-click="ctrl.showHelp()" class="show-help">Help</button>
</div>
<!--Play Game-->
<div class="app-body" ng-if="ctrl.game == true">
<div class="user-entry">
<input type="text" class="number-input" ng-model="ctrl.number"></input>
<br/>
<button ng-click="ctrl.guessNumber()" class="check-button">Check</button>
</div>
<span ng-bind="ctrl.message" class="message"></span>
<hr>
<div class="row">
<div class="col-md-6">
<h4 class="balls">Balls</h4>
<div class="result-balls-container">
<img ng-repeat="i in ctrl.darkBalls" src="images/correctball.png" class="correct-ball">
<img ng-repeat="i in ctrl.whiteBalls" src="images/misplacedball.png" class="misplaced-ball">
<img ng-repeat="i in ctrl.noBalls" src="images/defaultball.png" class="default-ball">
</div>
</div>
<div class="col-md-6">
<h4 class="remaining-guess">Remaining Guess: </h4>
<div class="guess-container">
<h3>{{ctrl.guessRemaining}}</h3>
</div>
</div>
</div>
<div class="row">
<h3>{{ctrl.correctNumber}}</h3>
<button ng-click="ctrl.endGame()" class="quit-game">Quit Game</button>
</div>
</div>
<div ng-if="ctrl.help == true">
<h5 class="help-title">May I Help You ?</h5>
<ul class="help-list">
<li class="list-item">1. You can make 8 guesses.</li>
<li class="list-item">2. Enter Four Digit Guess in the Input Field.</li>
<li class="list-item">3. Click check button to get outcome of guess.</li>
<li class="list-item">4. Gray Balls count corresponds to correct digits in the correct position.</li>
<li class="list-item">5. Black Balls count corresponds to correct digits in the incorrect position.</li>
<li class="list-item">6. If your guess is correct all four balls will be Gray.</li>
<li class="list-item">7. If you can not make correct guess untill 8 attempts, correct digits will be displayed.</li>
</ul>
<button ng-click="ctrl.goHome()" class="go-home">Back</button>
</div>
</div>
</div>
</div>
</body>
</html>