-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
141 lines (115 loc) · 4.13 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html ng-app="trextoe">
<head>
<title>T Rex Toe</title>
<meta charset="utf-8">
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<![endif]-->
<link rel="stylesheet" href="css/reset.css">
<link href='https://fonts.googleapis.com/css?family=Londrina+Outline' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Josefin+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/style.css">
<link rel="icon"
type="image/ico"
href="images/favicon.ico">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.17/angular.min.js"></script>
<script src="https://cdn.firebase.com/js/client/1.0.18/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/0.8.0/angularfire.min.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-controller="trextoeCtrl">
<div class="container">
<!-- frame one -->
<div id="frame_one" ng-show="submitname">
<div class="animated fadeInDown" id="titlecontain">
<h1 id="title_one">T Rex Toe</h1>
<div id="name_form">
<form ng-submit="startup()">
<input id="inputName"autofocus type="text" ng-model="playerName" placeholder="Enter name to start!">
<input id="submitButton" type="submit">
</form>
</div>
</div>
<div id="the_icons" class="animated bounceIn">
<figure class="in-line">
<figcaption>T Rex</figcaption>
<img class="startup_pic" src="images/dino.png">
<figcaption>a vicious apex predator</figcaption>
</figure>
<figure class="in-line">
<figcaption>The Toe</figcaption>
<img class="startup_pic" src="images/toe.png">
<figcaption>home of the toenail</figcaption>
</figure>
</div>
</div>
<!-- frame two -->
<!-- show waiting screen -->
<div ng-show="show_waiting">
<h1 id="waiting_title" class="title">T Rex Toe</h1>
<h2 id="waiting">waiting for another player to join...</h2>
<img id="loading_pic" src="images/loading.png">
</div>
<!-- show results -->
<div id="endblur" ng-show="db.end_game" class="animated" ng-click="reset()">
<div id="popup">
<h2 id="resultstatement" ng-hide="win || db.tie">You lose.</h2>
<h2 id="resultstatement" ng-show="win && !db.tie">You win!</h2>
<h2 id="resultstatement" ng-show="db.tie">It's a tie.</h2>
<h2 id="playagain">Play Again?</h2>
</div>
</div>
<!-- frame three -->
<!-- show board -->
<div id="frame_three">
<!-- game ready and players ready message -->
<!-- make fade in and out -->
<!-- info and debug -->
<div id="scoreboard" class="animated" ng-show="showNameScore">
<h1 ng-show="gameboard" class="title" id="title_three">T Rex Toe<br>Scoreboard</h1>
<figure id="leftscore">
<h2 id="pOne">{{db.pOnename}}</h2>
<figcaption id="pOnescore">{{db.scoreboard[0]}}</figcaption>
</figure>
<figure id="rightscore">
<h2 id="pTwo">{{db.pTwoname}}</h2>
<figcaption id="pTwoscore">{{db.scoreboard[1]}}</figcaption>
</figure>
</div>
<div id="whosturn" class="animated fadeInRight">
<h2 ng-show="showWhosTurn && db.whosup==playerName"><span ng-class="{toeturn:db.turn==2,dinoturn:db.turn==1}">Your</span> turn</h2>
<h2 ng-show="showWhosTurn && db.whosup!=playerName"><span ng-show="db.turn==1">{{db.pOnename}}</span><span ng-show="db.turn==2">{{db.pTwoname}}</span>'s turn</h2>
</div>
<div id="board_container">
<div
class="animated"
id="board"
ng-show="gameboard"
ng-repeat="row in db.board track by $index"
ng-class="{
clear: $index%3==0,
cell:true,
empty: db.board[$index].player!=2 && db.board[$index].player!=1,
taken_dino: db.board[$index].player==1,
taken_toe: db.board[$index].player==2,
borderbottom: $index<6,
borderleft: $index%3!=0
}"
ng-click="placePiece($index)"
>
<div
id="thepics"
ng-class="{
dino: db.board[$index].player==1,
toe: db.board[$index].player==2,
tie: db.tie,
winning: db.board[$index].win==1 || db.board[$index].win==2}">
</div>
</div>
</div>
</div>
</div>
</body>
</html>