-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (33 loc) · 1.67 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
<html ng-app="myApp">
<head>
<script src="node_modules/angular/angular.js"></script>
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
<script src="controller.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body ng-controller="controller">
<h1>Tic Tac Toe!</h1>
<div class="container">
<div class="well">
<div><button class="btn-primary btn-lg" ng-repeat="cell in board[0]" ng-disabled="isTaken(cell);" ng-click="move(cell);">{{ cell.value }}</button></div>
<div><button class="btn-primary btn-lg" ng-repeat="cell in board[1]" ng-disabled="isTaken(cell);" ng-click="move(cell);">{{ cell.value }}</button></div>
<div><button class="btn-primary btn-lg" ng-repeat="cell in board[2]" ng-disabled="isTaken(cell);" ng-click="move(cell);">{{ cell.value }}</button></div>
<br/>
<p>
<span ng-hide="winner || cat">Current Player: {{ currentPlayer }}</span>
<span ng-disabled="endOfGame" ng-show="winner">Player {{ currentPlayer }} won!</span>
<span ng-show="cat">Cat</span>
</p>
</div>
</div>
<div class="overlay" ng-show="showWin">
<h1 ng-class="'color-' + winningPlayer">Player {{winningPlayer}} Wins!</h1>
<button class="position" ng-click="reset();" class="btn btn-primary btn-large">New Game</button>
</div>
<div class="overlay" ng-show="showTye">
<h1>Game Tied!</h1>
<button class="position" ng-click="reset();" class="btn btn-primary btn-large">New Game</button>
</div>
</body>
</html>