- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
int search_cross_pnt(char cross_point[LN] , int *point ,char *content[PL] , int in_x, int in_y ){
int x = 0;
int y = 0;
int m = 0;
int key = 0;
for(x = 0; x <= PL - 1 ; x++) {
y = strlen(content[x] ) ;
for( m = 0; m <= y; m++ ){
if( ( *(cross_point + m ) != *(*(content + x ) + m ) && *(cross_point + m ) != 0 ) ||
( (( in_x + y ) > (X - 1) ) || ( ( in_y + y ) > (Y - 1) ) ) ) {
key = 0;
break;
}
if( *(cross_point + m ) == *(*(content + x ) + m )){
key++;
}
if( m == y ){
*point = x ; return key ;
}
}
}
return 0;
}
void write_horizantal ( int x , int y ,char board[][Y] , char *content ){
while( *content ){
*( *(board + x) + y++ ) = *content++ ;
}
}
void write_vertical( int x , int y , char board[][Y] , char *content ){
while( *content ){
*( *(board + x++ ) + y) = *content++ ;
}
}
int checking_space_null (char board[][Y] , int mem ,int sh, int br ){
int slc = 0;
if(
( board[ ( sh ) - br ][mem - 1 ] != 0 || board[ ( sh ) - br ][mem + 1 ] != 0 ) &&
board[ ( sh ) - br ][mem ] == 0 ) {
slc = 1;
}
return slc;
}
int checking_space_one (char board[][Y] , int mem ,int sh, int br ){
int slc = 0;
if(
( board[ mem - 1 ][ ( sh ) - br ] != 0 || board[ mem + 1 ][ ( sh ) - br ] != 0 ) &&
board[ mem ][ ( sh ) - br ] == 0
) {
slc = 1;
} return slc;
}
Комментарии (0) RSS
Добавить комментарий