This repository has been archived on 2025-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
Files
JavaOOP3Sem/labs/04-chess-stats/README.md

44 lines
979 B
Markdown
Raw 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.

# Шахматная партия (`04-chess`)
## Формулировка задания
Дан файл грок1 - Игрок2.txt` с описанием шахматной партии: набором шагов и результатом. Формат файла:
```
e4 e5
Nf3 Nc6
Bb5 a6
Ba4 Nf6
O-O Be7
d4 d6
c3 O-O
Re1 Nb8
h3 Nbd7
1-0
```
Необходимо вывести в стандартный вывод участников игры, пронумерованные шаги партии и результат. Имя читаемого файла передается через аргумент командной строки.
## Ожидаемый результат
```
Игроки: Игрок1 - Игрок2
1. e4 e5
2. Nf3 Nc6
3. b5 a6
4. Ba4 Nf6
5. O-O Be7
6. d4 d6
7. c3 O-O
8. Re1 Nb8
9. h3 Nbd7
Результат: 1-0
```
## Запуск через Gradle
```sh
gradle run --console=plain --args="/tmp/Игрок1\ -\ Игрок2.txt"
```