La matriz se podría programar en android... no debería ser muy complicado teniendo en cuenta que el código de la página es visible
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta charset="UTF-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="icon" type="image/png" href="cn.png" />
<meta name="viewport" content="width=550, user-scalable=yes">
<title>Codenames Board Generator</title>
<style>
body {text-align: center; font-size:30px; font-weight: bold; font-family: sans-serif;}
button { font-size: 30px; background-color: lightgray; border-radius: 10px; }
input { font-size: 25px; }
table { border-spacing: 0px; border-collapse: collapse; margin-left:auto; margin-right:auto; }
td { padding: 0px; width:100px; height:100px; border: 2px solid black; }
</style>
<script>
function RNG(seed) {
this.m = 0x100000000;
this.a = 1103515245;
this.c = 12345;
this.state = seed === undefined ? Math.floor(Math.random() * (this.m-1)) : seed;
}
RNG.prototype.nextInt = function() {
this.state = (this.a * this.state + this.c) % this.m;
return this.state;
}
RNG.prototype.nextFloat = function() {
return this.nextInt() / (this.m - 1);
}
RNG.prototype.nextRange = function(start, end) {
var rangeSize = end - start;
var randomUnder1 = this.nextInt() / this.m;
return start + Math.floor(randomUnder1 * rangeSize);
}
RNG.prototype.choice = function(array) {
return array[this.nextRange(0, array.length)];
}
Array.prototype.shuffle = function() {
var len = this.length;
var i = len;
while (i--) {
var p = rand.nextRange(0,len);
var t = this[i];
this[i] = this[p];
this[p] = t;
}
};
</script>
</head>
<body>
<div id="menu">
Game #<input id="inputnr" size="6"><br>
<button onclick="start()">Generate</button></button>
</div>
<div id="main" style="display:none">
Game #<span id="gamenr"></span> <button onclick="end()">Exit</button>
<table>
<tr><td id="t00"></td><td id="t10"></td><td id="t20"></td><td id="t30"></td><td id="t40"></td>
<tr><td id="t01"></td><td id="t11"></td><td id="t21"></td><td id="t31"></td><td id="t41"></td>
<tr><td id="t02"></td><td id="t12"></td><td id="t22"></td><td id="t32"></td><td id="t42"></td>
<tr><td id="t03"></td><td id="t13"></td><td id="t23"></td><td id="t33"></td><td id="t43"></td>
<tr><td id="t04"></td><td id="t14"></td><td id="t24"></td><td id="t34"></td><td id="t44"></td>
</table>
</div>
<script>
var rand;
if (localStorage && localStorage.state !== undefined) start(localStorage.state)
else end();
function start(seed) {
var agents, first;
rand = new RNG(seed !== undefined ? seed : document.getElementById('inputnr').value);
var gamenr = rand.state;
if (localStorage) localStorage.state = gamenr;
document.getElementById('gamenr').innerHTML = gamenr;
first = rand.choice([0,1]);
document.getElementById('gamenr').style.background = first ? "lightblue":"red";
agents = [
1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 0,
first ? 1 : 2 ];
agents.shuffle();
for (var i = 0; i < 5; i++) {
for (var j = 0; j < 5; j++) {
var id = 't'+i+j;
var td = document.getElementById(id);
td.style.backgroundColor = ["#333","blue", "red", "#999" ][agents[j*5+i]];
}
}
document.getElementById('main').style.display = "block";
document.getElementById('menu').style.display = "none";
}
function end() {
if (localStorage) localStorage.removeItem("state");
document.getElementById('main').style.display = "none";
document.getElementById('menu').style.display = "block";
document.getElementById('inputnr').value = Math.floor(Math.random() * 9999);
}
</script>
</body>
</html>