Giter Site home page Giter Site logo

sedchess's Introduction

Шахматы, написанные на языке утилиты sed / Chess implemented in sed utility

English guide is below

Запуск

sed -f chess.sed

Инструкция

Для начала нажите Enter. Чтобы выйти, нажмите q, затем Enter.

Чтобы сделать ход, введите его через пробел, затем Enter, например: e2 e4. Вы ходите белыми.

Реализовано:

  1. позиционная оценка на один ход и оценка фигур
  2. обнаружение шаха и мата
  3. прошедшая пешка преобразуется в ферзя

Не реализовано:

  1. рокировка (введена в правила в XIV-XV вв.)
  2. взятие на проходе (введено в XV в)
  3. обнаружение пата
  4. контроль за правильностью хода человека

Решения проблем

  • sed: file chess.sed line 312: strings for `y' command are different lengths

Убедитесь, что ваша консоль использует локаль UTF-8 (например, ru_RU.UTF-8)

English

Launch

sed -f chess.sed

How to play

Press Enter to start. Press q and Enter to quit.

To make a turn write it down separated by a space, then press Enter. For example: e2 e4. You play white side.

Implemented

  1. Position evaluation for one turn and pieces evaluation.
  2. Detection of check and checkmate.
  3. A pawn that reaches the opposite side promotes to a queen.

Not implemented

  1. Castling (introduced in 14-15th century rules)
  2. En passant (introduced in 15th century rules)
  3. Detection of stalemate
  4. Controlling correctness of human moves

Troubleshooting

-- Евгений Степанищев / Evgeny Stepanischev

sedchess's People

Contributors

bolknote avatar kloun avatar sorrymak avatar vladmos avatar ziman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sedchess's Issues

Король продолжает отступать при мате

Если поставить королю мат, зажав его скраю двумя ладьями (или ладьей и ферзем), мат не распознается, зато король отступает в угол, съедая свои же фигуры (хоть это и не спасает его от мата :)

При попытке съесть короля все-таки признает мат и выходит.

Короткой партии, чтобы воспроизвести проблему, нет, но у меня всегда так получалось.

Пропуск хода + сьедание фигуры

Спасибо за прекрасную игру на sed'e!

Описание проблемы:
Если написать неверный путь, например в самом начале h2h1, то выйдет пропуск хода. На дальнейших стадиях игры можно просто ходить поверх фигур.

Нет контроля правильности хода фигур

Слон чёрных может двигаться по вертикали.
Лог игры (написал ручками, поскольку chess.log пустой, 1 - белые, 2 - черные):

1: e2 e4
2: h7 h5
1: g1 f3
2: h5 h4
1: g2 g4
2: h4 h3
1: f3 g1
2: g7 g5
1: f1 h3 - взял пешку слоном
2: h8 h3 - взял слона ладьёй
1: g1 h3 - взял ладью конём
2: f7 f5
1: h3 g5 - взял пешку конём
2: f5 f4
1: b1 c3
2: f4 f3
1: g5 f3 - взял пешку конём
2: f8 f3 - взятие коня слоном

Если попробовать совершить заведомо некорректный ход пешкой через всё поле, игра завершается, однако ход на одну клетку по диагонали без взятия вражеской пешки проходит успешно.

Checkmate not correctly detected

Hello,

With the following moves:

e2 e4
f1 c4
d1 f3
f3 f7

The black king "eats" the black queen instead of being checkmated.

This is also shown with simply d1 f7 as your first (invalid) move.

Шах и мат на первом ходу :-)

Если после запуска и нажатия Enter ввести e2e4 (слитно), и опять нажать Enter, то будет написано " Мне шах и мат, я проиграл" и игра завершится.

Bug, bishop moves

My moves:
d2 d4
e2 e4
f1 c4
d1 f3
f3 f7
And than black bishop takes on f7 (f8 f7) %) That's not good.

Error

[flareguner@citadel tmp]$ git clone https://github.com/bolknote/SedChess.git
Cloning into 'SedChess'...
remote: Counting objects: 199, done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 199 (delta 67), reused 199 (delta 67)
Receiving objects: 100% (199/199), 49.14 KiB | 0 bytes/s, done.
Resolving deltas: 100% (67/67), done.
Checking connectivity... done
[flareguner@citadel tmp]$ cd SedChess/
[flareguner@citadel SedChess]$ sed -f chess.sed 
sed: file chess.sed line 312: strings for `y' command are different lengths

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.