正在做的事:填字游戲
bug解決:同向挨著的單詞

bug演示
比如stop和inside兩個挨著了,在填字游戲中造成了障礙。
主要判斷交叉點的四個角是否有單詞
$count = 0;
if (empty($table[$x - 1][$y - 1])) $count++;
if (empty($table[$x + 1][$y - 1])) $count++;
if (empty($table[$x - 1][$y + 1])) $count++;
if (empty($table[$x + 1][$y + 1])) $count++;
if ($count != 4) {
echo "無法放置";
return false;
}