Логика угадайки добавлена
This commit is contained in:
		
							parent
							
								
									7be59a5cf0
								
							
						
					
					
						commit
						d1ebd91521
					
				| @ -79,6 +79,7 @@ namespace ProgLab1.GUI | ||||
|             { | ||||
|                 input.BackColor = SystemColors.Window; | ||||
|                 double inputNum = double.Parse(input.Text); | ||||
|                 Console.WriteLine(Math.Abs(answer - inputNum)); | ||||
|                 if (Math.Abs(answer - inputNum) < 0.1) | ||||
|                 { | ||||
| 
 | ||||
| @ -87,6 +88,11 @@ namespace ProgLab1.GUI | ||||
|                 { | ||||
|                     tryes--; | ||||
|                 } | ||||
| 
 | ||||
|                 if(tryes <= 0) | ||||
|                 { | ||||
|                     this.Close(); | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             tryCount.Text = $"Количество попыток: {tryes}"; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user