function aff_client($str, $glob = 0) { if ($glob == 0) { echo vert("[Client : ] ") . $str . "\n"; } else { echo vert("Client [lvl:") . cyan($glob["lvl"]) . vert("] =>") . $str . "\n"; } }
function aff_ok($str) { // printf("%s", vert($str."\n")); echo vert($str . "\n"); return TRUE; }
function check($board, $col) { // vertical if (checkFour(vert($board, $col))) { return true; } // horizontal if (checkFour(horiz($board, $col))) { return true; } // diagonal (right) if (checkFour(diag($board, $col, 1))) { return true; } // diagonal (left) if (checkFour(diag($board, $col, 0))) { return true; } return false; }