nikoli/views/nurikabe.slim

18 lines
493 B
Plaintext
Raw Normal View History

2014-12-05 17:27:23 +01:00
- content_for(:title) { 'Nurikabe' }
2014-12-05 12:52:12 +01:00
2014-12-05 17:27:23 +01:00
h1 Nurikabe
#board
2014-12-05 12:52:12 +01:00
2014-12-05 17:27:23 +01:00
script type="text/javascript" src="/nurikabe.js"
javascript:
document.addEventListener("DOMContentLoaded", function() {
2014-12-09 12:30:29 +01:00
nurikabe = new Nikoli.Nurikabe(document.getElementById('board'));
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "#{url('/data/nurikabe/5x5.json')}");
xmlhttp.addEventListener('load', function(evt) {
nurikabe.generate(JSON.parse(evt.target.responseText)) })
xmlhttp.send();
2014-12-05 17:27:23 +01:00
});