A programmatically Cleaning Robot that informs the number of places cleaned after each execution.
dotnet test tests/MrRobot.UnitTests/MrRobot.UnitTests.csproj
dotnet run --project "source/MrRobot.ConsoleApp/MrRobot.ConsoleApp.csproj"
2
10 22
E 2
N 1
Expected Output:
=> Cleaned: 4
Or try the demo.sh
which runs the robot for multiple inputs
chmod 777 demo.sh
./demo.sh
Expected Output:
=> Cleaned: 4
=> Cleaned: 40
=> Cleaned: 11
=> Cleaned: 800000
Usage:
dotnet run --project "source/MrRobot.ConsoleApp/MrRobot.ConsoleApp.csproj"
[number of commands]
[initial position x] [initial position y]
[direction] [number of steps]
[direction] [number of steps]
..
[direction] [number of steps]
Where:
[number of commands] : 0..N
[initial position x] : -100000..100000
[initial position y] : -100000..100000
[direction] : N E S W
[number of steps] : 0..200000
Run scripts/sql-docker-up.sh
to setup a SQL Server in a Docker container with the following Connection String:
Server=localhost;User Id=sa;Password=<YourNewStrong!Passw0rd>;
Run the EF Tool to add a migration to the MrRobot.Infrastructure
project.
dotnet ef migrations add "InitialCreate" -o "EntityFrameworkDataAccess/Migrations" --project source/MrRobot.Infrastructure --startup-project source/MrRobot.ConsoleApp
Generate tables and seed the database via Entity Framework Tool:
dotnet ef database update --project source/MrRobot.Infrastructure --startup-project source/MrRobot.ConsoleApp
- MacOS Sierra
- VSCode ❤️
- .NET Core SDK 2.2.
- Docker 🐳
- SQL Server.
I am happy to answer issues. Give a ⭐ if you like the project.