18 lines
486 B
Plaintext
18 lines
486 B
Plaintext
- content_for(:title) { 'Nurikabe' }
|
|
|
|
h1 Nurikabe
|
|
#board
|
|
|
|
script type="text/javascript" src="/nurikabe.js"
|
|
javascript:
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
nurikabe = new 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();
|
|
});
|