     }
     delay(j);
 
-    if (analogRead(b11) < 100 && analogRead(b21) < 100) {
+    if (button11.flagClick == 1 && button21.flagClick == 1) {
       lcd.setCursor(0, 0); lcd.print("Both plrs false start!");
       return;
     }
-    else if (analogRead(b21) < 100) {
+    else if (button21.flagClick == 1) {
       lcd.setCursor(0, 0); lcd.print("Red plr false start! Green plr wins!");
       game = GAME_PERFORMED;
       x = 5; y = 2; vector = 1;
       return;
     }
-    else if (analogRead(b11) < 100) {
+    else if (button11.flagClick == 1) {
       lcd.setCursor(0, 0); lcd.print("Green plr false start! Red plr wins!");
       game = GAME_PERFORMED;
       x = 6; y = 2; vector = -1;

  _timeButton = timeButton;
  pinMode(_pin, INPUT_PULLUP);  // определяем вывод кнопки как вход
}
LiquidCrystal_I2C lcd(0x3f, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display

int b11 = A0, b12 = A1, b13 = A2, b14 = A3, b15 = A4, b21 = A5, b22 = A6, b23 = A7, b24 = A8, b25 = A9, //buttons

}

void in_game() {
  button11.flagClick = 0;
  button12.flagClick = 0;
  button13.flagClick = 0;
  button14.flagClick = 0;
  button15.flagClick = 0;
  button21.flagClick = 0;
  button22.flagClick = 0;
  button23.flagClick = 0;
  button24.flagClick = 0;
  button25.flagClick = 0;
  digitalWrite(field[x][y], HIGH);
  delay(1000);
  digitalWrite(field[x][y], LOW );
  if ((button14.flagClick == 1) || (button24.flagClick == 1)) {
    x = x +  vector;
  }
  if ((button13.flagClick == 1) || (button23.flagClick == 1)) {
    x = x -  vector;
  }
  if ((button12.flagClick == 1) || (button22.flagClick == 1)) {
    y = y + vector;
  }
  if ((button15.flagClick == 1) || (button25.flagClick == 1)) {
    y = y - vector;
  }
}
