Предмет: Английский язык, автор: ibrahimmagzom2011

responsible
y islanders.
any seals at
t can help
ondon are
UK.
= a lot of
stries are
1 The Sphinx is a
Egypt.
The pollution in the sea and on the beaches is
spoiling many
3 Car exhaust fumes can damage monuments
located along.....
4 Cutting down trees causes.
2
of
5 Many people have difficulty breathing in hot
and ......
6 More and more plants
and animals are
becoming

Ответы

Автор ответа: mishaparet
0

Ответ:

1. responsible

2. islanders

3. any seals at

4. It can help

5. London are

6. UK.

7. = a lot of

8. stories are

9. 1 The Sphinx is a

10. Egypt.

11. The pollution in the sea and on the beaches is

12. spoiling many

13. 3 Car exhaust fumes can damage monuments

14. located along...

15. 4 Cutting down trees causes.

16. 2 of

17. 5 Many people have difficulty breathing in hot

18. and...

19. 6 More and more plants

20. and animals are

21. becoming


rakhimbayadelya: куасын ба
Похожие вопросы
Предмет: Информатика, автор: sashagavrysh2021
80 БАЛЛОВ

Допрацюйте проєкт, розроблений на занятті. Додайте
кнопку для рестарту гри.
Крім того, по закінченню гри виведіть у Serial Monitor загальний рахунок гравця (кількість комбінацій, які йому вдалося повторити).

const int LED_RED = 11;
const int LED_GREEN = 9;
const int LED_BLUE = 7;
const int LED_YELLOW = 5;

const int LED_CORRECT = 4;
const int LED_WRONG = 2;

const int BTN_RED = 12;
const int BTN_GREEN = 10;
const int BTN_BLUE = 8;
const int BTN_YELLOW = 6;

int counter;

int GAME_SPEED = 250;
int GAME_STATUS = 0;
int GAME_SEQUENCE[50];
int GAME_STEP = 0;
int READ_STEP = 0;

void setup(){
Serial.begin(9600);
randomSeed(analogRead(0));
pinMode(LED_RED, OUTPUT);
pinMode(LED_GREEN, OUTPUT);
pinMode(LED_BLUE, OUTPUT);
pinMode(LED_YELLOW, OUTPUT);
pinMode(LED_CORRECT, OUTPUT);
pinMode(LED_WRONG, OUTPUT);
pinMode(BTN_RED, INPUT_PULLUP);
pinMode(BTN_GREEN, INPUT_PULLUP);
pinMode(BTN_BLUE, INPUT_PULLUP);
pinMode(BTN_YELLOW, INPUT_PULLUP);
Serial.begin(9600);
}


void loop(){
switch(GAME_STATUS){
case 0:
resetGame();
break;
case 1:
playSequence();
break;
case 2:
readSequence();
break;
case 3:
gameOver();
break;
if (digitalRead(counter) == LOW) {
GAME_STATUS = 0;
resetGame();

}


}




}

void resetGame(){
READ_STEP = 0;
GAME_STEP = 0;
for (int i = 0; i < 50; i++){
GAME_SEQUENCE[i] = random(4) + 1;
}
GAME_STATUS = 1;
Serial.println("reset");
digitalWrite(LED_CORRECT, 0);
digitalWrite(LED_WRONG, 0);
}

void playSequence(){
for (int i = 0; i <= GAME_STEP; i++){
delay(GAME_SPEED * 2);
setLED(GAME_SEQUENCE[i]);
delay(GAME_SPEED);
setLED(0);
}
GAME_STATUS = 2;
Serial.println("play");
}

void readSequence(){
int btn_value = readButtons();

if (btn_value > 0){
if (btn_value == GAME_SEQUENCE[READ_STEP]){
Serial.println("read");
setLED(btn_value);
digitalWrite(LED_CORRECT, 1);
delay(GAME_SPEED);
setLED(0);
digitalWrite(LED_CORRECT, 0);

if (READ_STEP == GAME_STEP){
READ_STEP = 0;
GAME_STEP = GAME_STEP + 1;
GAME_STATUS = 1;
setLEDs(true, true, true, true);
delay(GAME_SPEED);
setLEDs(false, false, false, false);
if (GAME_SPEED > 100){
GAME_SPEED = GAME_SPEED - 15;
}
}
else {
READ_STEP = READ_STEP + 1;
}
delay(1000);
}
else {
GAME_STATUS = 3;
}
}
delay(10);
}

void gameOver(){
digitalWrite(LED_WRONG, 1);
Serial.println("game over");
GAME_STATUS = 4;
}

int readButtons(void){
if(digitalRead(BTN_RED) == 0) return 1;
else if(digitalRead(BTN_GREEN) == 0) return 2;
else if(digitalRead(BTN_BLUE) == 0) return 3;
else if(digitalRead(BTN_YELLOW) == 0) return 4;

return 0;
}


void setLED(int id){
switch(id){
case 0:
setLEDs(false,false,false,false);
break;
case 1:
setLEDs(true,false,false,false);
break;
case 2:
setLEDs(false,true,false,false);
break;
case 3:
setLEDs(false,false,true,false);
break;
case 4:
setLEDs(false,false,false,true);
break;
}
}

void setLEDs(boolean red, boolean green, boolean blue, boolean yellow ){
if (red) digitalWrite(LED_RED, HIGH);
else digitalWrite(LED_RED, LOW);
if (green) digitalWrite(LED_GREEN, HIGH);
else digitalWrite(LED_GREEN, LOW);
if (blue) digitalWrite(LED_BLUE, HIGH);
else digitalWrite(LED_BLUE, LOW);
if (yellow) digitalWrite(LED_YELLOW, HIGH);
else digitalWrite(LED_YELLOW, LOW);
}
void resetGame(){
SCORE = 0;
}
Предмет: Қазақ тiлi, автор: imperatorzhangalov
Предмет: Математика, автор: heyonop228