function CorectField($card,&$mas) { switch($card) { case 1: { if($mas[1] == 1 || $mas[3] == 1) return true; return false; } case 2: { if($mas[0] == 1 || $mas[2] == 1 || $mas[4] == 1) return true; } case 3: { if($mas[1] == 1 || $mas[5] == 1) return true; return false; } case 4: { if($mas[0] == 1 || $mas[4] == 1 || $mas[6] == 1 ) return true; return false; } case 5: { if($mas[1] == 1 || $mas[3] == 1 || $mas[5] == 1 || $mas[7] == 1) return true; return false; } case 6: { if($mas[2] == 1 || $mas[4] == 1 || $mas[8] == 1 ) return true; return false; } case 7: { if($mas[3] == 1 || $mas[7] == 1) return true; return false; } case 8: { if($mas[4] == 1 || $mas[6] == 1 || $mas[8] == 1) return true; return false; } case 9: { if($mas[5] == 1 || $mas[7] == 1) return true; return false; } default : { return false; } } }