![image](https://habrastorage.org/getpro/habr/post_images/3a3/6e6/b1b/3a36e6b1b12214f156e7c645a932633a.jpg)
Минимакс на примере игры в зайца и волков
11 мин
![image](https://habrastorage.org/getpro/habr/post_images/3a3/6e6/b1b/3a36e6b1b12214f156e7c645a932633a.jpg)
Пользователь
var firstTh = document.createElement('th');
firstTh.appendChild(document.createTextNode('first name'));
var secondTh = document.createElement('th');
secondTh.appendChild(document.createTextNode('last name'));
var firstTr = document.createElement('tr');
firstTr.appendChild(firstTh);
firstTr.appendChild(secondTh);
var firstTd = document.createElement('td');
firstTd.appendChild(document.createTextNode('Joe'));
var secondTd = document.createElement('td');
secondTd.appendChild(document.createTextNode('Stelmach'));
var secondTr = document.createElement('tr');
secondTr.appendChild(firstTd);
secondTr.appendChild(secondTd);
var table = document.createElement('table');
table.appendChild(firstTr);
table.appendChild(secondTr);
document.body.appendChild(table);
$.el.table(
$.el.tr(
$.el.th('first name'),
$.el.th('last name')),
$.el.tr(
$.el.td('Joe'),
$.el.td('Stelmach'))
).appendTo(document.body);
$.el.div({'class' : 'example'},
$.el.div('content'));
<div class='example'>
<div>content<div/>
</div>