domaca_uloha_7
This commit is contained in:
		
							parent
							
								
									b6741f316c
								
							
						
					
					
						commit
						886dcc0079
					
				| @ -52,9 +52,8 @@ int is_snake(struct snake* snake,int x,int y){ | |||||||
| 	if (snake == NULL) return 0; | 	if (snake == NULL) return 0; | ||||||
| 	 | 	 | ||||||
|     do { |     do { | ||||||
|     	if (snake->x == x) { |     	if (snake->x == x || snake->y == y) return 1; | ||||||
|     		if (snake->y == y) return 1; |     	snake = snake->next; | ||||||
| 		} |  | ||||||
| 		 | 		 | ||||||
| 	} while (snake->next != NULL); | 	} while (snake->next != NULL); | ||||||
| 	 | 	 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user