-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
197 lines (188 loc) · 9.14 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!doctype html>
<html>
<head>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="css/catship.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<title>Catship</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="Catship Indie Game" />
<meta name="description" content="Catship is an indie game about a few regular dudes who happen to be cats who embarked on an action packed quest. Set in ancient egypt, prepare yourself for a fun rollercoaster adventure.">
<!-- external libraries -->
<script src="src/phaser.min.js"></script>
<script src="src/jquery-1.11.1.min.js"></script>
<script src="src/jsrsasign-latest-all-min.js"></script>
<script src="src/angular.min.js"></script>
<script src="src/bootstrap.min.js"></script>
<!-- catship libraries -->
<script src="src/crypto.js"></script>
<script src="src/variables.js"></script>
<script src="src/boot.js"></script>
<script src="src/preload.js"></script>
<script src="src/gametitle.js"></script>
<script src="src/thegame.js"></script>
<script src="src/gameover.js"></script>
<script>
(function() {
var game = new Phaser.Game(800, 680, Phaser.CANVAS, "game");
game.state.add("Boot", boot);
game.state.add("Preload", preload);
game.state.add("GameTitle", gameTitle);
game.state.add("TheGame", theGame);
game.state.add("GameOver", gameOver);
game.state.start("Boot");
})();
</script>
</head>
<body>
<body>
<div class="container bg-secondary" ng-app="myApp" ng-controller="formCtrl">
<form novalidate>
<ul class="nav nav-pills">
<li class="active"><a data-toggle="pill" href="#game">GAME</a></li>
<li><a data-toggle="pill" href="#wallet">WALLET</a></li>
<li><a data-toggle="pill" href="#send">SEND</a></li>
<li><a data-toggle="pill" href="#mine">MINE</a></li>
<li><a data-toggle="pill" href="#search">SEARCH</a></li>
<li><a data-toggle="pill" href="#transactions">TRANSACTIONS</a></li>
<br>
</ul>
<!--div class="container bg-secondary" ng-app="myApp" ng-controller="formCtrl"-->
<div class="tab-content">
<div id="game" class="tab-pane fade in active">
</div>
<div id="wallet" class="tab-pane fade">
<div class="inside">
<h2>WALLET</h2>
<h3>Private Key</h3>
<p>
(Keep this secret and write it down somewhere for safe keeping)
<br>
<br>
<input type="text" ng-model="user.PrvKey">
<br>
<br>
<h3>Public Key</h3>
<p>
(This is also your wallet address so you can share it with people and let them send you coins to this address)
<br>
<br>
<input type="text" ng-model="user.PubKey">
<br>
<br>
<h3>Current Balance</h3>
<p>
<p class="tb">{{master.Balance | number : 9}}
<p>
<br>
</div>
</div>
<div class="tab-pane fade" id="send">
<div class="inside">
<h2>MAKE PAYMENT</h2>
<h3>Pay to</h3>
<p>
(insert someones public key / wallet address here)
<br>
<br>
<input type="text" ng-model="user.ReceieverPubKey">
<br>
<br>
<h3>Amount</h3>
<p>
(must be smaller then your balance but greater then 0)
<br>
<br>
<br>
<input type="text" ng-model="user.Amount">
<br>
<br>
<h3>Message</h3>
<p>
(you can attach a cool message to your payment to be stored in the catShipBlockChain for eternity!)
<br>
<br>
<input type="text" ng-model="user.Message">
<br>
<br>
<button ng-click="sendPayment()">SEND PAYMENT</button>
<br>
<h3>Status</h3>
<p>{{master.TransactionStatus}}
<br>
<br>
</div>
</div>
<div class="tab-pane fade" id="mine">
<div class="inside">
<h2>MINE COINS</h2>
<p>
<button ng-click="mineCoins()">MINE CATSHIP COINS!</button>
<br>
<p>Current Score Total
<p class="tb"> {{master.ScoreBalance}}
<p>Current Difficulty
<p class="tb"> {{master.Difficulty}}
<p>Remaining Score Required To Mine A Block
<p class="tb"> {{master.ScoreRemaining}}
<h3>Status</h3>
<p class="tb">{{master.MiningStatus}}
<p>
</div>
</div>
<div class="tab-pane fade" id="search">
<div class="inside">
<h2>SEARCH CATSHIP CHAIN</h2>
<h3>Enter Block Height To View</h3> (insert a number here to view that block of the blockchain)
<br>
<br>
<input type="text" ng-model="user.BlockHeight">
<br>
<br>
<button ng-click="searchBlock()">SEARCH</button>
<br>
<br>
<p> Result:
<br>
<code>
<pre>{{SearchedBlock |json}}</pre>
</code>
<p>
</div>
</div>
<div class="tab-pane fade" id="transactions">
<div class="inside ">
<h2>PREVIOUS TRANSACTIONS</h2>
<br>
<table>
<thead fix-head>
<tr>
<th>BLOCK</th>
<th>DATE</th>
<th>TRANSACTION ID</th>
<th>SENDER ADDRESS</th>
<th>RECEIVER ADDRESS</th>
<th>VALUE</th>
<th>MESSAGE</th>
<th>SIGNATURE</th>
</tr>
</thead>
<tr ng-repeat="x in names track by $index ">
<td>{{ x.blockHeight }}</td>
<td>{{ x.utcTimeStamp | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
<td>{{ x.transactionID }}</td>
<td>{{ x.senderAddress }}</td>
<td>{{ x.receiverAddress }}</td>
<td>{{ (x.senderAddress==user.PubKey) ? -1*x.value : x.value | number:9 }}</td>
<td>{{ x.message }}</td>
<td>{{ x.signature }}</td>
</tr>
</table>
<br>
<br>
</div>
</div>
</div>
</body>
</html>