Files
paper-racing-gpi/run-astar.sh
2025-10-20 19:35:38 +05:00

38 lines
1.3 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Скрипт для запуска Paper Racing с алгоритмом A*
if [ $# -eq 0 ]; then
echo "╔════════════════════════════════════════╗"
echo "║ Paper Racing - A* Solver ║"
echo "╚════════════════════════════════════════╝"
echo ""
echo "Использование:"
echo " $0 [путь_к_карте.json]"
echo ""
echo "Примеры:"
echo " $0 # Встроенная карта"
echo " $0 maps/open-field.json # Простая карта (3 чекпоинта)"
echo " $0 maps/racing-map-42x42.json # Сложная карта (59 чекпоинтов)"
echo ""
echo "Доступные карты:"
for map in maps/*.json; do
[ -f "$map" ] && echo " - $map"
done
echo ""
read -p "Запустить со встроенной картой? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
dotnet run --project racing-astar.csproj
fi
else
if [ -f "$1" ]; then
dotnet run --project racing-astar.csproj "$1"
else
echo "❌ Ошибка: Файл '$1' не найден!"
exit 1
fi
fi