basis fr AI

This commit is contained in:
AUnicornWithNoLife 2021-04-13 15:55:37 +01:00
parent 02dd891dbd
commit 3d0ea057c7
4 changed files with 28 additions and 0 deletions

4
src/ai.js Normal file
View File

@ -0,0 +1,4 @@
function predict()
{
}

View File

@ -155,4 +155,14 @@ function reset()
tabloid.classList.remove('win');
tabloid.classList.remove('lol');
}
function mode(id)
{
if (id != gamemode)
{
gamemode = id;
reset();
}
}

View File

@ -17,6 +17,17 @@
</head>
<body onload="load();">
<table id='main' class='center'>
<tr>
<th>
<h1>Gamemode</h1>
</th>
<th>
<div id='modes'>
<button onmousedown='mode(1);'>1v1</button>
<button onmousedown='mode(2);'>AI</button>
</div>
</th>
</tr>
<tr>
<th>
<table id='board'>

View File

@ -4,6 +4,7 @@ var score;
var ids;
var ptm;
var tabloid;
var gamemode;
function load()
{
@ -56,4 +57,6 @@ function load()
ptm = 1;
tabloid = document.getElementById('board');
gamemode = 1;
}