-
Notifications
You must be signed in to change notification settings - Fork 0
/
help.html
117 lines (72 loc) · 10.9 KB
/
help.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Змеи (тестовый клиент)</title>
<style type="text/css">
body {
background-color: #9cf; color: #000;
font-family: Verdana, sans-serif; font-size: 80%; line-height: 2em;
}
#content {
background-color: #fff; max-width: 50em; margin: auto; border: 2px solid #000; padding: 2em;
}
a[href] { color: #369; font-weight: bold; text-decoration: underline; }
h1 { font-size: 130%; }
h2 { font-size: 120%; }
p { text-indent: 2em; }
#toc { list-style-type: none; }
</style>
</head>
<body>
<div id="content">
<h1>Змеи (тестовый клиент)</h1>
<p>Справка по тестовому клиенту (<a href="http://github.com/ava12/snakes-test-client">репозиторий</a>, <a href="http://ava12.github.io/snakes-test-client/">демонстрация</a>, <a href="http://forum.sources.ru/index.php?showtopic=365692">тема на форуме</a>) для игры <a href="http://wiki.sources.ru/doku.php?id=projects:snakes">«Змеи»</a>.</p>
<ul id="toc">
<li><a href="#pre">Что, как и зачем</a></li>
<li><a href="#main">Главная вкладка</a></li>
<li><a href="#bots">Список ботов</a></li>
<li><a href="#snakes">Список змей</a></li>
<li><a href="#fights">Список боев</a></li>
<li><a href="#view">Просмотр бота</a></li>
<li><a href="#edit">Редактирование змеи</a></li>
<li><a href="#plan">Планирование боя</a></li>
<li><a href="#fight">Просмотр боя</a></li>
</ul>
<h2><a name="pre">Что, как и зачем</a></h2>
<p>Как известно, никто не читает инструкции заранее. Поэтому при написании справки автор сделал предположение, что читатели уже ознакомились с игрой. Здесь не будет полного описания всех элементов интерфейса с картинками и анимациями — только прояснение некоторых неочевидных моментов.
<p>Данная версия игры не использует какой-либо сервер, все данные хранятся на стороне клиента, все расчеты производятся также на стороне клиента. Версия однопользовательская, соответственно, никаких турниров, все бои только тренировочные. Игра опробована и, вроде бы, работает на современных версиях браузеров Opera (и 12, и 15), Firefox, Chrome, а также IE9. Игру можно запускать и на сайте, и из локального каталога (но в последнем случае IE не сможет сохранять данные в локальном хранилище).
<p>Версия тестовая, предназначена для поиска ошибок и непонятностей, поэтому автор не стремился к стилистическому и эстетическому совершенству (да и не дизайнер я, и рисовать не умею). Так что все просьбы поиграться со шрифтами или поправить пару пикселей будут игнорироваться. Если уж глаза колет, лучше поправьте сами, как считаете нужным, и покажите, что получилось.
<h2><a name="main">Главная вкладка</a></h2>
<p>Кнопки «Сохранить данные» и «Удалить данные» позволяют, соответственно, сохранить состояние игры в локальном хранилище (с ключом Snakes) либо удалить данные из хранилища. Сохраняются текущие списки змей и боев, а также открытые вкладки. При открытии/обновлении страницы игры эти данные загружаются автоматически. Внимание: редактор змей и просмотрщик боев сохраняют данные только в объектах JavaScript; если после этого не нажать «Сохранить данные» на главной вкладке, то при закрытии страницы эти данные будут потеряны!
<h2><a name="bots">Список ботов</a></h2>
<p>Список имеющихся ботов. Стандартные боты:
<ul>
<li>Трус: никогда не атакует, удирает от противников.
<li>Балбес: владеет некоторыми навыками преследования и нападения.
<li>Бывалый: неплохо ищет, преследует и атакует противников, но далек от совершенства.
</ul>
<p>Список ботов можно расширить, импортировав в редакторе змею в формат JSON и внеся этот код в файл js/bots.js.
<h2><a name="snakes">Список змей</a></h2>
<p>Список созданных игроком змей, отсортированный по их именам (без учета регистра и буквы «ё» (которая в русском алфавите между буквами «е» и «ж»)). Список может содержать не более 10 змей.
<p>Кнопки «Новая» и «Импорт» открывают редактор змей; во втором случае запрашивается JSON-представление змеи, ранее экспортированной из редактора.
<p>При удалении змеи также удаляется открытая вкладка редактора с этой змеей.
<h2><a name="fights">Список боев</a></h2>
<p>Список сохраненных игроком боев, упорядоченный по времени сохранения. Не более 10 боев.
<p>Кнопка «Новый бой» открывает новую вкладку планировщика боя. Кнопка «Импорт» открывает просмотр боя, при этом запрашивается JSON-представление боя.
<p>В случае, если имеется открытая вкладка просмотра боя, то при удалении боя из списка эта вкладка остается, бой просто помечается как несохраненный.
<h2><a name="view">Просмотр бота</a></h2>
<p>Озор программы выбранного бота. Если описание программы или карты не умещается в отведенном ему месте, то можно просмотреть описание целиком, кликнув на нем.
<h2><a name="edit">Редактирование змеи</a></h2>
<p>Клик на изображении змеи выбирает шкуру. Клик на имени змеи задает новое имя. Если задано непустое имя, то змея автоматически сохраняется в списке змей (если не возникает конфликта имен и список не переполнен). Если задано пустое имя, то змея удаляется из списка, но остается в редакторе. Кнопка «Экспорт» открывает в новом окне JSON-представление змеи.
<p>Клик по подсвеченной кнопке в нижней части редактора снимает подсветку. Кнопки шаблонов/наборов, групп и модификатора «НЕ» могут быть подсвеченны независимо. При редактировании карты можно менять либо шаблон/набор, содержащийся в клетке, либо группу, либо и то, и другое. Если выбран только шаблон/набор, то при клике на чистой клетке карты автоматически назначается первая И-группа. Модификатор «НЕ» ставится или снимается (в зависимости от состояния кнопки) всегда.
<h2><a name="plan">Планирование боя</a></h2>
<p>Клик по цветной полосе выбирает змею для соответствующей позиции. Если на первой позиции находится временная (безымянная) змея, ее нельзя заменить или убрать.
<p>Кнопка «В бой» рассчитывает бой и затем заменяет вкладку планирования на вкладку просмотра боя.
<h2><a name="fight">Просмотр боя</a></h2>
<p>Клик на змее выбирает ее для отладки (по умолчанию ни одна змея не выбрана). Повторный клик по змее отменяет выбор. Если змея выбрана, то при остановленном показе боя отображается ситуация перед шагом этой змеи (если змея не выбрана, показывается ситуация перед первым шагом хода).
<p>Кнопка «Сохранить» сохраняет запись боя в списке боев. Кнопка «Удалить» удаляет запись из списка, но вкладка просмотра сохраняется.
<p>Кнопка «Экспорт» открывает в новом окне JSON-представление записи боя. Если вы подозреваете, что бой рассчитывается или отображается неправильно (непонятное поведение змей, некорректная отрисовка, неверная сумма длин змей), то экспортируйте запись и передайте ее автору. Внимание: экспортированная запись содержит программы змей!
</div>
</body>
</html>