equal
deleted
inserted
replaced
142 </table> |
142 </table> |
143 <button id="test">test</button> |
143 <button id="test">test</button> |
144 </div> |
144 </div> |
145 <h1>AIs</h1> |
145 <h1>AIs</h1> |
146 <div> |
146 <div> |
147 <div class="ai" id="ai-random"> |
147 <div class="ai" id="ai-blind-random"> |
148 <button class="ai">enable</button> |
148 <button class="ai">enable</button> |
149 <h5>bling random</h5> |
149 <h5>bling random</h5> |
150 </div> |
150 </div> |
151 <div class="ai" id="ai-blind-cycle"> |
151 <div class="ai" id="ai-blind-cycle"> |
152 <button class="ai">enable</button> |
152 <button class="ai">enable</button> |
476 // Register AIs. |
476 // Register AIs. |
477 |
477 |
478 ui.ai = {}; |
478 ui.ai = {}; |
479 ui.ai.current = null; |
479 ui.ai.current = null; |
480 ui.ai.algList = { |
480 ui.ai.algList = { |
481 "ai-random": function() { |
481 "ai-blind-random": function() { |
482 return new ai.random(ui.brdEngine); |
482 return new ai.blindRandom(ui.brdEngine); |
483 }, |
483 }, |
484 "ai-blind-cycle": function(aiDom) { |
484 "ai-blind-cycle": function(aiDom) { |
485 var cfg = {}; |
485 var cfg = {}; |
486 cfg.clockwise = aiDom.querySelectorAll("input[name='clockwise']")[0].checked; |
486 cfg.clockwise = aiDom.querySelectorAll("input[name='clockwise']")[0].checked; |
487 cfg.whilePossible = aiDom.querySelectorAll("input[name='whilePossible']")[0].checked; |
487 cfg.whilePossible = aiDom.querySelectorAll("input[name='whilePossible']")[0].checked; |