Создать агента
51 USDдомашния задания.
Создать агента с автоматом.
Агент должен имееть две позиции. патрулирует стреляет.
начальные кординаты агента (10.10) мои (0.0)
Вы можете ходить вверх в вниз на лево на право с стрелочками (←↑→↓)
Если растоянние до агента меньше 10 он стреляет короткий звук. Если растоянние больше 10 агент патрулирует. Когда агент патрулирует в каждой итерации он меняет х или у кординат на 1.
C++ язык
-----------------------------
для звука
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
Beep(523,500); // 523 hertz (C5) for 500 milliseconds
cin.get(); // wait
return 0;
}
Для стрелочек.
---------------------
#include <conio.h>
#include <iostream>
using namespace std;
#define KEY_UP 72
#define KEY_DOWN 80
#define KEY_LEFT 75
#define KEY_RIGHT 77
int main()
{
int c = 0;
while(1){
c = getch();
switch(c) {
case KEY_UP:
cout << endl << "Up" << endl;//key up
break;
case KEY_DOWN:
cout << endl << "Down" << endl; // key down
break;
case KEY_LEFT:
cout << endl << "Left" << endl; // key left
break;
case KEY_RIGHT:
cout << endl << "Right" << endl; // key right
break;
default:
cout << endl << "null" << endl; // not arrow
break;
}
}
return 0;
}
-
6706 139 1 2 Здравствуйте, сделаю ваше задание с большим желанием.
Про процесс работы могу уведомлять.
Также есть возможность добавить новый функционал.
Жду вашего положительного ответа.
-
270 7 2 Здравствуйте, задача понятна смогу выполнить в указанный срок. Если нужны какие-то дополнения, обращайтесь в приват.
Current freelance projects in the category C & C++
Residential Proxy Infrastructure EngineerWe're building a residential proxy network from scratch — fully owned, no third-party suppliers. We need one exceptional network engineer to build the entire technical foundation. What you'll build: - Android background SDK that routes proxy traffic through user devices… C & C++, DevOps ∙ 3 days 9 hours back ∙ 13 proposals |
Improvement in the existing version of 1C retail block for the distribution center (DC)In general, I will explain what kind of database we have - There is a main server where there is a retail database (where all receipts are recorded) - a UTP database - where all sales are transferred - it calculates the markup and stock balances - small databases of retail… C & C++, C# ∙ 3 days 23 hours back ∙ 6 proposals |
About the Master Program "KONSTRUCTOR"
4182 USD
We are looking for a very experienced C++ developer to modernize existing software (master program). The program is responsible for creating derivative software representing audio-visual sessions of psychological correction. The current version is written in pure WinAPI (Visual… C & C++, Desktop Apps ∙ 9 days 3 hours back ∙ 19 proposals |
Writing code for ArduinoIt is necessary to develop software for a weight dispenser based on Arduino Uno. Components: Arduino Uno R3 HX711 + load cell LCD1602 I2C display MAX7219 LED matrix 8x32 5 control buttons 4-channel relay 2 signal lamps Coarse dosing vibrator Precise dosing vibrator Operation… C & C++, Embedded Systems & Microcontrollers ∙ 10 days 11 hours back ∙ 15 proposals |
It is necessary to complete the project or provide consultation.
23 USD
|