Да можно и так. Вопрос только сколько кнопок нажимать: одну или две. Потом исходные данные могут быть очень с разным качеством. Иногда приходиться разбираться со сложными форматами. Например, с объединениями ячеек. Вот такая таблица:
Вот фрагмент из программы, написанной по законам этого жанра:
Before opening the thin door:
if player wear the uniform:
say «Second pilot! Welcome on board!»;
continue the action;
otherwise:
say «For staff only!»;
stop the action.
After going to Cockpit:
end the game in victory;
After going through the metal detector:
if player carry id and electric switch is switched on:
end the game in death;
otherwise:
continue the action.
After taking the news paper:
Now the boarding pass is in the location;
say «The piece of paper fall down at the floor»;
continue the action.
Carry out inserting something into the slot:
if noun is id:
say «Click!»;
now the wood door is unlocked;
otherwise:
remove the noun from play.
Report inserting something into the slot: say "[if noun is not id][The noun] falls out of sight, and you know you will never see it again."
Instead of giving pass to Stewardess:
now Stewardess carries pass;
say «All Right, Please find your place rear of plane».
Instead of going from Front of Plane to Rear of plane:
if Stewardess carries the Boarding pass:
continue the action;
otherwise:
say «Stop. Give me pass»;
stop the action;
Но есть нюанс: считывать данные можно неограниченно, а вот писать рекомендуется не больше 17.5 Гбайт в день. Откуда взялась такая странная цифра – не знаю. Но, скорее всего, уложиться в этот лимит будет несложно. Ведь вряд ли вы будете использовать SSD, да еще и такого объема, для файлопомойки. Например, в моем главном компьютере он станет главным системным.
Я зашел в Диспетчер Задач. Пишет много и активно, всякий свопинг, Проводник и тд. Или есть как с этим бороться?
Если имеется ввиду последняя фотография, то это прототип дизайна. То бишь просто листочек бумажки на проволочке. А окончательное решение в планах, как и написал.
Для реализации карт (правил) я считаю наиболее удобным является свой псевдо-язык. Или патерн «интерпретатор». ОО это хорошо, но как показывает практика и обсуждение для хорошей реализации требуется хорошая ОО модель. Не думаю что для всех карт возможна такая модель, либо это будет модель исключений. Агент — это тоже своего рода уход от статики.
Потому (псевдо-язык) и пролог.
даст, вот такой csv:
Раньше делал на VBA, теперь на Прологе.
Before opening the thin door:
if player wear the uniform:
say «Second pilot! Welcome on board!»;
continue the action;
otherwise:
say «For staff only!»;
stop the action.
After going to Cockpit:
end the game in victory;
After going through the metal detector:
if player carry id and electric switch is switched on:
end the game in death;
otherwise:
continue the action.
After taking the news paper:
Now the boarding pass is in the location;
say «The piece of paper fall down at the floor»;
continue the action.
Carry out inserting something into the slot:
if noun is id:
say «Click!»;
now the wood door is unlocked;
otherwise:
remove the noun from play.
Report inserting something into the slot: say "[if noun is not id][The noun] falls out of sight, and you know you will never see it again."
Instead of giving pass to Stewardess:
now Stewardess carries pass;
say «All Right, Please find your place rear of plane».
Instead of going from Front of Plane to Rear of plane:
if Stewardess carries the Boarding pass:
continue the action;
otherwise:
say «Stop. Give me pass»;
stop the action;
Я зашел в Диспетчер Задач. Пишет много и активно, всякий свопинг, Проводник и тд. Или есть как с этим бороться?
Потому (псевдо-язык) и пролог.