--- a/2048.html Mon Sep 15 02:57:23 2014 +0300
+++ b/2048.html Mon Sep 15 20:53:35 2014 +0300
@@ -51,7 +51,7 @@
.report > .name {
font-weight: bold;
}
- div.ai {
+ div.ai, div.settings {
border: 1px red solid;
margin-top: 20px;
padding: 2px;
@@ -69,7 +69,12 @@
left: 1em;
top: -1em;
}
- div.ai > div.option {
+ button#statistic {
+ display: inline-block;
+ float: left;
+ margin: 3px 4px;
+ }
+ div.ai > div.option, div.setting {
display: inline-block;
float: left;
margin: 1px 4px;
@@ -77,7 +82,7 @@
border: 1px solid tan;
border-radius: 4px;
}
- div.ai > div.option > input.positive {
+ div.ai > div.option > input.positive, div.settings > div.setting > input {
text-align: right;
max-width: 4em;
margin-right: 2px;
@@ -222,7 +227,13 @@
<div id="report-area" class="area">
<h1>Reports</h1>
- <div class="report" class="area">
+ <div class="settings">
+ <div class="setting"><input type="text" id="count-limit" value="10"> times</div>
+ <div class="setting">limit to <input type="text" id="time-limit" value="10"> sec</div>
+ <button id="statistic">Start</button>
+ <div class="clearfix"></div>
+ </div>
+ <div class="report">
<div class="name">next max score</div>
<table>
<tr>
@@ -613,6 +624,21 @@
ui.ai.current = ui.ai.algList[aiDom.id](aiDom);
}
+
+ ////////////////////////////////////////////////////////////////
+ // Reports and statistic.
+
+ function statistic() {
+
+ }
+
+ var statisticBtn = document.getElementById('statistic');
+ statisticBtn.addEventListener("click", statistic);
+
+
+ ////////////////////////////////////////////////////////////////
+ // Initialise game.
+
ui.brdEngine = BoardArr2d; // TODO make user selectable
if (localStorage.val2048) {