~ubuntu-branches/ubuntu/quantal/kde-l10n-uk/quantal-proposed

« back to all changes in this revision

Viewing changes to docs/kdegames/kajongg/index.docbook

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-11-06 11:00:32 UTC
  • mfrom: (1.12.19)
  • Revision ID: package-import@ubuntu.com-20121106110032-1za568q1h8ezohc1
Tags: 4:4.9.3-0ubuntu0.1
New upstream release (LP: #1074747)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
>Kajongg</application
6
6
>">
7
7
  <!ENTITY kappname "&kajongg;">
8
 
  <!ENTITY kappversion "4.7.0"
 
8
  <!ENTITY kappversion "4.9.0"
9
9
><!--Application version. Use this variable everywhere it is needed.-->
10
10
  <!ENTITY package "kdegames"
11
11
>  <!-- do not change this! -->
34
34
  <!ENTITY violatesoriginalcall "violatesoriginalcall">
35
35
  <!ENTITY dangerousgame "dangerousgame">
36
36
  <!ENTITY nochoice "nochoice">
37
 
  <!ENTITY payforall "payforall">
38
 
  <!ENTITY payers "payers">
39
 
  <!ENTITY payees "payees">
40
 
  <!ENTITY absolute "absolute">
41
 
  <!ENTITY lastsource "lastsource">
42
37
]>
43
38
 
44
 
<book lang="&language;"
 
39
<!-- TODO: describe the window with the list of tables -->
 
40
 
 
41
<book id="kajongg" lang="&language;"
45
42
> <!-- do not change this! -->
46
43
<bookinfo>
47
44
        <title
80
77
>&FDLNotice;</legalnotice>
81
78
 
82
79
<date
83
 
>2011-05-11</date
 
80
>28 березня 2012 року</date
84
81
><!-- Date of (re)writing, or update.-->
85
82
<releaseinfo
86
83
>&kappversion;</releaseinfo
290
287
        <para
291
288
>У цьому вікні ви зможете ввести рахунки для всіх гравців вручну. Крім того, ви можете точно визначити плитки, власником яких є кожен з гравців. Якщо ви почнете вказувати плитки, відповідне поле для безпосереднього введення рахунку буде позначено сірим кольором. Результат буде обчислено програмою &kajongg; у автоматичному режимі. </para>
292
289
        <para
293
 
>After having entered all relevant data for a hand, press the button <guibutton
294
 
>Save Hand</guibutton
295
 
>. The hand values will be entered in the data base, and they are also entered in the score table. You might be prompted to change the seating positions of the players but you can choose not to change seats. The proposed changes are currently not customizable - if a ruleset needs something different, we will change that. </para>
 
290
>Після введення всіх відповідних даних для гравця натисніть кнопку <guibutton
 
291
>Зберегти дані гравця</guibutton
 
292
>. Після натискання цієї кнопки дані гравця буде додано до бази даних, а також до таблиці результатів. Можливо, програма попросить вас змінити позиції гравців, але ви можете їх і не змінювати. У поточній версії ще не можна змінити запропоновані програмою параметри. Якщо для певного набору правил подібна зміна є необхідною, автори можуть реалізувати відповідну можливість. </para>
296
293
        <para
297
294
>Якщо гравець є ймовірним переможцем, програма увімкне поле у стовпчику «Переможець». Позначте це поле, якщо гравець і справді є переможцем. </para>
298
295
        <para
342
339
        </sect2>
343
340
        <sect2 id="enterhand-penalties">
344
341
        <title
345
 
>Penalties</title>
 
342
>Покарання</title>
346
343
                        <screenshot>
347
344
                                <screeninfo
348
345
>Знімок вікна &kajongg;</screeninfo>
393
390
        <para
394
391
>Якщо ви бажаєте зіграти з гравцями-людьми, вам потрібен буде ігровий сервер, з яким всі гравці, зокрема і ви, маєте встановити з’єднання. Зробити це можна вибором відповідного вузла або введенням назви вузла вручну з наступним введенням пароля для доступу до цього вузла. Програма запропонує вам скористатися останнім з введених паролів. </para
395
392
><para
396
 
>If you do not have an account on that server with the name you entered, you will be asked if you want to open an account. If you say yes, you will get a new dialog where you can enter the wanted password twice. Your account will be created automatically. </para
 
393
>Найпростішим способом є використання сервера гри за адресою <ulink url="http://www.kde.org/applications/games/kajongg/"
 
394
>kajongg.org</ulink
 
395
>. У списку можливих серверів гри &kajongg; буде показано лише цей сервер. Будь ласка, зауважте, що у поточній версії <ulink url="http://www.kde.org/applications/games/kajongg/"
 
396
>kajongg.org</ulink
 
397
> є лише сервером гри, вебсторінки та інших служб не передбачено. </para
 
398
><para
 
399
>Якщо на сервері гри немає облікового запису з вказаною вами назвою, програма запитає вас про те, чи не бажаєте ви створити такий запис. Якщо ви підтвердите створення, буде відкрито діалогове вікно, у якому вам слід буде двічі ввести бажаний пароль до запису. Після введення пароля програма створити обліковий запис у автоматичному режимі. </para
397
400
><para
398
401
>Після успішного входження до ігрового сервера програма покаже список столів, за якими можна грати на сервері. Приєднайтеся до одного зі столів або створіть власний. Якщо вами було створено власний стіл, дочекайтеся приєднання до нього достатньої кількості гравців. Гру за новим столом можна розпочати будь-коли: вільні місця буде заповнено комп’ютерними гравцями. </para
399
402
><para
401
404
>Порівняти</guibutton
402
405
> для порівняння цього набору з вашим власними наборами правил. </para
403
406
><para
404
 
>You can start the &kajongg; game server in two different ways: <itemizedlist
 
407
>Якщо ви не хочете користуватися <ulink url="http://www.kde.org/applications/games/kajongg/"
 
408
>kajongg.org</ulink
 
409
> або будь-яким іншим сервером гри, ви можете запустити власний сервер гри &kajongg; у один з таких двох способів: <itemizedlist
405
410
><listitem
406
411
><para
407
412
>встановити з’єднання з сервером "localhost". Цим сервером буде ваш власний комп’ютер. Якщо ви виберете цей варіант, а ігровий сервер ще не буде запущено, програма запустить його у автоматичному режимі. Після завершення гри програма так само автоматично завершить роботу сервера. </para
408
413
></listitem
409
414
><listitem
410
415
><para
411
 
>manually start a server on any computer you want. All you need to do is go to a command line and start the program "kajonggserver". Entering "kajonggserver --help" will show you all available options like changing the default port 8149. This server will run until you kill it. </para
 
416
>запустити сервер на будь-якому іншому комп’ютері вручну. Для цього вам достатньо наказати виконати програму <literal
 
417
>kajonggserver</literal
 
418
> за допомогою командного рядка. Якщо ви скористаєтеся командою <literal
 
419
>kajonggserver --help</literal
 
420
>, програма покаже вам всі можливі параметри, зокрема подасть довідку щодо зміни типового порту. Запущений таким чином сервер працюватиме, доки ви не перервете його роботу. </para
412
421
></listitem
413
422
></itemizedlist>
414
423
        </para
415
424
><para
416
 
>In both cases you need to tell the other players how they can reach your game server. They need the &URL; or simply an IP address and the port your server is listening on. This might be something like "mypc.dyndns.org:8149" where 8149 is the port. Of course you need to configure your firewall such that the remote player can reach that port. The communication will be encrypted. </para
417
 
><para
418
 
>If you encounter possible bugs, you might want to use the option "--showtraffic". This will show you, on the console where the game server has been started, what messages are flowing between the game server and the clients. </para>
 
425
>У обох випадках вам слід повідомити іншим гравцям про те, яким чином можна з’єднатися з вашим ігровим сервером. Вам потрібно буде назвати адресу URL або просто IP-адресу, а також порт, на якому сервер очікуватиме на з’єднання. Це може бути щось на зразок <literal
 
426
>mypc.dyndns.org:8409</literal
 
427
>, де <literal
 
428
>8409</literal
 
429
> — це номер порту. Звичайно ж, вам слід налаштувати брандмауер вашого комп’ютера таким чином, щоб віддалений гравець зміг встановити з’єднання з відповідним портом. Весь обмін даними буде зашифровано. </para
 
430
><para
 
431
>Сервер визначає типовий порт на основі даних щодо версії. Якщо, наприклад, ви користуєтеся &kajongg; версії 4.9.5, буде використано порт 8409: 8000 плюс перша цифра версії помножена н на 100 плюс середня цифра версії. Якщо користувачем не буде вказано порту для встановлення з’єднання з сервером, клієнтська програма обчислить номер порту у такий самий спосіб. Отже, якщо комп’ютер працює з декількома ігровими серверами, програма використовуватиме сумісний з нею сервер автоматично. Щоб там не сталося, але сервер гри і клієнтська частина автоматично забезпечать сумісність між собою і попередять користувача, якщо таку сумісність встановити не вдасться. </para
 
432
><para
 
433
>Якщо ви натрапите на можливі вади у програмі, ви можете скористатися параметром <literal
 
434
>--debug=traffic</literal
 
435
>. За його допомогою ви зможете побачити у консолі, з якої запущено ігровий сервер, повідомлення, якими обмінювалися сервер гри та клієнти. </para>
419
436
        <sect2 id="playing-caveats">
420
437
        <title
421
438
>Застереження</title>
431
448
><title
432
449
>Правила гри</title>
433
450
<para
434
 
>Worldwide, many different game variants exist. Right now we only describe the rules for Classical Chinese as played in Germany. However most of the basic rules are the same in most variants.</para>
 
451
>У різних частинах світу у гру грають по різному. У поточній версії &kajongg; передбачено два варіанти класичних китайський правил: за одним з них грають у Німеччині, за іншим — у Великобританії. </para
 
452
><para
 
453
>Цей опис не є надто докладним, тому стосується обох варіантів.</para
 
454
><para
 
455
>Більшість основних правил є спільними для різних варіантів гри.</para>
435
456
  <para
436
457
>Оскільки правила гри вже використано у &kajongg;, у нашому описі ми поговоримо лише про речі, які не є очевидними.</para>
437
458
  <para
443
464
>Мета гри</title>
444
465
  <para
445
466
>Кожен з гравців намагається зібрати у себе виграшну комбінацію плиток. Якщо таку комбінацію буде зібрано, гравець проголошує «маджонґ». У виграшній комбінації плитки, зазвичай, можна розподілити на п’ять груп: чотири групи з трьох або чотирьох плиток кожна і п’ята груп з двох однакових плиток. Звичайна група складається з трьох або чотирьох однакових плиток (які називаються панг і конг, відповідно) або трьох послідовних плиток, наприклад Бамбук 3, Бамбук 4, Бамбук 5 (інша назва «чоу»).</para>
446
 
  </sect2
447
 
>     
 
467
  </sect2>
448
468
  <sect2>
449
469
    <title
450
470
>Хід гри</title>
504
524
><para
505
525
>Ви можете відкинути плитку за допомогою клавіатури у той самий спосіб, що і для решти дій у програмі. Крім того, ви можете скористатися вказівником миші для пересування плитки з вашого набору плиток до області відкидання (внутрішньої області за стінами). Розташування плитки у області відкидання все ж буде виконано комп’ютером, оскільки розташування має бути однаковим для всіх гравців. </para
506
526
><para
507
 
>Often, the dialogs will offer choices which are not really applicable like calling Pung when you do not have the needed tiles. This is intended - just like in a real game. </para
 
527
>Часто діалогові вікна пропонують вам варіанти, які є неможливими, наприклад оголошення пангу, коли у вас немає потрібних плиток. Так зроблено навмисно, щоб гра була більше схожою на реальну. Втім, ви можете наказати програмі не показувати неможливі варіанти вибору: <guilabel
 
528
>Параметри</guilabel
 
529
>, <guilabel
 
530
>Показувати лише можливі дії</guilabel
 
531
>. </para
508
532
><para
509
533
>Відкинуті плитки розподіляються між стінами випадковим чином. У деяких варіантах гри розташування таких плиток строго регламентується, але у поточній версії гри подібне налаштування неможливе. Можливість налаштування буде реалізовано як частину правил гри. </para>
510
534
        </sect1>
563
587
                                <term
564
588
><menuchoice
565
589
><guimenu
566
 
>Game</guimenu
 
590
>Гра</guimenu
567
591
> <guimenuitem
568
 
>Abort</guimenuitem
 
592
>Перервати гру</guimenuitem
569
593
> </menuchoice
570
594
></term>
571
595
                                <listitem
579
603
                                <term
580
604
><menuchoice
581
605
><guimenu
582
 
>Game</guimenu
 
606
>Гра</guimenu
583
607
> <guimenuitem
584
 
>Quit</guimenuitem
 
608
>Вийти з &kajongg;</guimenuitem
585
609
> </menuchoice
586
610
></term>
587
611
                                <listitem
603
627
                                <term
604
628
><menuchoice
605
629
><guimenu
606
 
>View</guimenu
 
630
>Перегляд</guimenu
607
631
> <guimenuitem
608
 
>Scoring</guimenuitem
 
632
>Показати редактор правил оцінок</guimenuitem
609
633
> </menuchoice
610
634
></term>
611
635
                                <listitem
659
683
                                <listitem
660
684
><para
661
685
><action
662
 
>Explain Scores</action
663
 
> <screenshot
664
 
> <screeninfo
665
 
>Score Table</screeninfo
666
 
> <mediaobject
667
 
> <imageobject
668
 
> <imagedata fileref="explain.png" format="PNG"/> </imageobject
669
 
> <textobject
670
 
> <phrase
671
 
>Score Table</phrase
672
 
> </textobject
673
 
> </mediaobject
674
 
> </screenshot
675
 
> Explains how the score for the current hand was computed. </para
 
686
>Пояснення рахунку</action
 
687
></para>
 
688
                                <screenshot>
 
689
                                        <screeninfo
 
690
>Підсумкова таблиця</screeninfo>
 
691
                                        <mediaobject>
 
692
                                                <imageobject>
 
693
                                                <imagedata fileref="explain.png" format="PNG"/>
 
694
                                                </imageobject>
 
695
                                                <textobject>
 
696
                                                <phrase
 
697
>Підсумкова таблиця</phrase>
 
698
                                                </textobject>
 
699
                                        </mediaobject>
 
700
                                </screenshot>
 
701
                                <para
 
702
>Надає пояснення щодо рахунку для поточного гравця. </para
 
703
></listitem>
 
704
                        </varlistentry>
 
705
                        <varlistentry id="view-chat">
 
706
                                <term
 
707
><menuchoice
 
708
><guimenu
 
709
>Перегляд</guimenu
 
710
> <guimenuitem
 
711
>Спілкування</guimenuitem
 
712
> </menuchoice
 
713
></term>
 
714
                                <listitem
 
715
><para
 
716
><action
 
717
>Спілкування</action
 
718
></para>
 
719
                                <screenshot>
 
720
                                        <screeninfo
 
721
>Вікно спілкування</screeninfo>
 
722
                                        <mediaobject>
 
723
                                                <imageobject>
 
724
                                                <imagedata fileref="chat.png" format="PNG"/>
 
725
                                                </imageobject>
 
726
                                                <textobject>
 
727
                                                <phrase
 
728
>Вікно спілкування</phrase>
 
729
                                                </textobject>
 
730
                                        </mediaobject>
 
731
                                </screenshot>
 
732
                                <para
 
733
>Надає змогу спілкуватися з іншими гравцями. </para
676
734
></listitem>
677
735
                        </varlistentry>
678
736
                </variablelist>
929
987
                        <varlistentry>
930
988
                                <term>
931
989
                                        <guilabel
 
990
>Пропонувати дії</guilabel>
 
991
                                </term>
 
992
                                <listitem
 
993
><para
 
994
>Якщо у вас буде вибір дії, зокрема щодо оголошення чи неоголошення плитки або вибору плитки, яку слід відкинути, &kajongg; може допомогти вам підказками. </para
 
995
></listitem>
 
996
                        </varlistentry>
 
997
                        <varlistentry>
 
998
                                <term>
 
999
                                        <guilabel
932
1000
>Використовувати звуки, якщо такі передбачено</guilabel>
933
1001
                                </term>
934
1002
                                <listitem
962
1030
><title
963
1031
>Звук</title>
964
1032
        <para
965
 
>It is possible to record sound files for your announcements which will be heard by the other players. There is some manual work needed: </para>
966
 
            <itemizedlist
967
 
><listitem
968
 
><para
969
 
>First you need to find out where to store your voice files. This folder normally is ~/.kde/share/apps/kajongg. So if your login name is joe, this might be /home/joe/.kde/share/apps/kajongg. In there you will also find the database kajongg.db. </para
970
 
></listitem
971
 
><listitem
972
 
><para
973
 
>In the folder you just located, generate a new subfolder with the name <filename class="directory"
974
 
>voices</filename
975
 
>. </para
976
 
></listitem
977
 
><listitem
978
 
><para
979
 
>In the folder <filename class="directory"
980
 
>voices</filename
981
 
> generate another subfolder with your player name. This is the name you use when connecting to a game server. You may also want to define voices for the players <filename
982
 
>ROBOT 1</filename
983
 
>, <filename
984
 
>ROBOT 2</filename
985
 
>, <filename
986
 
>ROBOT 3</filename
987
 
>. </para
988
 
></listitem
989
 
><listitem
990
 
><para
991
 
>In that subfolder, you can place the sound files. They have to be encoded with the <ulink url="http://xiph.org/vorbis/"
 
1033
>Грати набагато цікавіше, якщо ви чуєте, як гравці оголошують про ходи або викидання плиток. Крім того, так грати простіше, оскільки ви можете зосередитися на власних плитках, вам не потрібно відволікатися на розглядання плиток, які було викинуто іншими гравцями. </para>
 
1034
        <para
 
1035
>У &kajongg; передбачено звукові файли для різних гравців. Набори цих звукових файлів (голоси) призначатимуться гравцям автоматично. Для кожної мови має бути записано чотири голоси, два чоловічі і два жіночі. &kajongg; намагається використовувати голоси тієї мови, якою показано інтерфейс &kajongg;. Якщо голосів відповідною мовою виявлено не буде, &kajongg; повернеться до використання голосів інших мов. Буде використано ті мови, які було визначено як резервні для &kajongg; (див. <menuchoice
 
1036
><guimenu
 
1037
>Довідка</guimenu
 
1038
><guimenuitem
 
1039
>Перемкнути мову програми</guimenuitem
 
1040
></menuchoice
 
1041
>). Якщо голосових файлів вашою мовою ще не створено, вам варто записати ці голосові файли і надіслати їх розробникам &kajongg;. </para>
 
1042
         <itemizedlist
 
1043
><listitem
 
1044
><para
 
1045
>Нижче описано процедуру створення голосових файлів. Для кожного голосу слід створити окрему теку. У файловій системі має бути дві групи голосів з різними розташуваннями. <itemizedlist
 
1046
><listitem
 
1047
><para
 
1048
>Стандартні голоси для кожної мови. Ці голоси зберігаються у теці з назвою <filename class="directory"
 
1049
>/usr/share/kde4/apps/kajongg/voices/МОВА</filename
 
1050
>, де МОВА — код вашої мови. Теки голосів, розташовані безпосередньо у <filename class="directory"
 
1051
>.../kajongg/voices/</filename
 
1052
> є теками голосів американською англійською. Стандартні голоси призначаються гравцям випадковим чином. Такі голоси мають назви <literal
 
1053
>"male1 male2 female1 female2"</literal
 
1054
>, але вказані імена насправді нічого не значать, оскільки ви ніколи не бачитимете ці імена у грі. Крім того, немає сенсу визначати понад чотири стандартні голоси на одну мову. </para
 
1055
></listitem
 
1056
><listitem
 
1057
><para
 
1058
>Голоси, визначені користувачем, можна створювати для кожного з користувачів програми. Якщо у &kajongg; визначено використання такого голосу, відповідні голосові дані буде передано іншим гравцям за допомогою інтернету. Такі голоси зберігаються у теці з назвою, подібною до <filename class="directory"
 
1059
>~/.kde/share/apps/kajongg/voices/</filename
 
1060
>. Отже, якщо вашим користувачем у системі є користувач ivan, відповідна тека матиме назву <filename class="directory"
 
1061
>/home/ivan/.kde/share/apps/kajongg/voices/ivan/</filename
 
1062
>. Теки <filename class="directory"
 
1063
>voices/</filename
 
1064
> у вашій системі може не існувати. Якщо ви не знайдете такої теки, створіть її. </para
 
1065
></listitem
 
1066
></itemizedlist>
 
1067
                </para
 
1068
></listitem
 
1069
><listitem
 
1070
><para
 
1071
>Тепер, коли ви знаєте, куди слід зберегти ваші нові голосові файли, час створити для них новий каталог. </para
 
1072
></listitem
 
1073
><listitem
 
1074
><para
 
1075
>У відповідній підтеці ви можете зберегти файли звукових даних. Звукові дані має бути збережено у кодуванні <ulink url="http://xiph.org/vorbis/"
992
1076
>Ogg Vorbis</ulink
993
 
> audio compressor, the file names need to have the extension <filename class="extension"
 
1077
>, назви файлів мають завершуватися суфіксами <filename class="extension"
994
1078
>.ogg</filename
995
 
>. </para
996
 
></listitem
997
 
><listitem
998
 
><para
999
 
>A single file has a name like <filename
 
1079
>. Зразок назви файла: <filename
1000
1080
>s3.ogg</filename
1001
 
> - this is Stone 3. You should define such files for all tiles and for all claims and announcements. </para
 
1081
> — файл для Каменя 3. Вам слід створити такі файли для всіх плиток і для всіх оголошень. Якщо файла не вистачатиме, нічого страшного не трапиться, — ви просто не почуєте відповідного звуку. Використання резервних файлів з інших мов можливе лише для цілих голосів, — окремі звукові файли не використовуватимуться. </para
 
1082
></listitem
 
1083
><listitem
 
1084
><para
 
1085
>Після визначення всіх файлів звукових даних для стандартного голосу, будь ласка, переконайтеся, що процес &kajongg; має доступ на запис до нового каталогу голосів. Запустіть &kajongg; і виконайте перевірку голосу. Якщо все гаразд, ви можете прибрати доступ на запис (так і слід зробити для стандартних голосів). &kajongg; автоматично створить файл з назвою <filename
 
1086
>md5sum</filename
 
1087
>, у якому міститиметься контрольна сума файлів звукових даних. Під час кожної зміни, додавання або вилучення файла звукових даних &kajongg; намагатиметься оновити дані цієї контрольної суми. </para
1002
1088
></listitem
1003
1089
></itemizedlist>
1004
 
            <para
1005
 
>Please make the length of the sound short but speak clearly - this game can be played very fast when you get used to it. It is easier if you first write down a list with everything that should be spoken. Do not read it as a sequence of items, try to pronounce each item as if it were the only one and as you would when playing. Reading this needs a little practicing.</para>
1006
 
            <para
 
1090
        <para
 
1091
>Будь ласка, намагайтеся говорити швидко, але чітко, — у гру можна грати дуже швидко, якщо трохи до неї призвичаїтися. Вам буде легше, якщо ви спочатку створите список всіх фраз, які слід вимовити. Не читайте список як суцільний текст, намагайтеся вимовити кожен пункт окремо, так, як ви вимовляли б його під час гри. Залишайте між словами паузи. Подібний спосіб читання потребує певної вправності.</para>
 
1092
        <para
1007
1093
>Ось лише один зі способів створення файлів звукових даних: </para
1008
1094
><para
1009
1095
><itemizedlist
1037
1123
></listitem
1038
1124
></itemizedlist
1039
1125
></para>
1040
 
            <para
 
1126
        <para
1041
1127
>Нижче наведено список назв файлів, які вам слід створити. До вказаних назв слід додати суфікс <filename
1042
1128
>.ogg</filename
1043
1129
>:</para>
1087
1173
<entry
1088
1174
>&originalcall; &violatesoriginalcall;</entry>
1089
1175
<entry
1090
 
>Original call and its violation</entry>
 
1176
>Початковий виклик і його порушення</entry>
1091
1177
</row>
1092
1178
<row>
1093
1179
<entry
1179
1265
>На початку нової гри ви зможете обрати набір правил, за якими вона вестиметься. Можна використовувати будь-який набір правил з визначених у редакторі наборів правил. Набір правил зберігається разом з грою, отже ви завжди зможете змінити набори правил, але внесені вами зміни стосуватимуться лише наступних ігор. </para>
1180
1266
                        <sect2
1181
1267
><title
1182
 
>Rule, Score and Unit</title
1183
 
><para
1184
 
>Simply double click on whatever you want to change.</para>
1185
 
                        </sect2>
1186
 
                        <sect2
1187
 
><title
1188
 
>Definition</title
1189
 
><para
1190
 
>The definition for a rule can be rather complex. There is a separate chapter <link linkend="rule"
1191
 
>Defining a Rule</link
1192
 
> for this. You will normally not have to change a definition. This essentially defines to what hands the rule applies.</para>
 
1268
>Правило, очки, подвоєння, обмеження</title
 
1269
><para
 
1270
>Просто наведіть вказівник на пункт, який ви бажаєте змінити, і двічі клацніть лівою кнопкою миші. Якщо всі значення буде прибрано, правило не впливатиме на гру. Окремі правила не можна вилучати.</para>
1193
1271
                        </sect2>
1194
1272
                        <sect2
1195
1273
><title
1196
1274
>Копіювання і вилучення</title
1197
1275
><para
1198
 
>You can copy entire rulesets or single rules within a ruleset. Since predefined rulesets are immutable, single rules can only be copied within customized rulesets. </para
 
1276
>Ви можете копіювати і вилучати цілі набори правил. </para
1199
1277
><para
1200
 
>You can remove entire customized rulesets or single rules within them. Again this can even be done if existing games use this ruleset since every game has its own ruleset copy. You can view rulesets for old games: <link linkend="game-menu-scoreGame"
1201
 
>Load</link
1202
 
> the old game and <link linkend="view-menu"
1203
 
>show its score table</link
 
1278
>Знову ж таки, ви можете робити це, навіть якщо існують ігри, які використовують змінений набір правил, оскільки у кожній з ігор міститься власна копію правил, за якими вона ведеться. Ви можете переглянути набори правил для попередніх ігор: <link linkend="game-menu-scoreGame"
 
1279
>завантажте</link
 
1280
> попередню гру і накажіть програмі <link linkend="view-menu"
 
1281
>показати таблицю з її рахунком</link
1204
1282
>. </para>
1205
1283
                        </sect2>
1206
1284
                        <sect2
1323
1401
<term
1324
1402
><keycombo action="simul"
1325
1403
>&Ctrl;<keycap
 
1404
>H</keycap
 
1405
></keycombo
 
1406
></term>
 
1407
<listitem>
 
1408
<para
 
1409
>Показати вікно спілкування </para>
 
1410
</listitem>
 
1411
</varlistentry>
 
1412
 
 
1413
<varlistentry>
 
1414
<term
 
1415
><keycombo action="simul"
 
1416
>&Ctrl;<keycap
1326
1417
>G</keycap
1327
1418
></keycombo
1328
1419
></term>
1377
1468
</sect1>
1378
1469
</chapter>
1379
1470
 
1380
 
<chapter id="rule"
1381
 
><title
1382
 
>Defining a Rule</title>
1383
 
<para
1384
 
>The scoring engine and many other aspects of &kajongg; can be customized with the ruleset editor. A rule consists of a name, a score (including its unit) and a <link linkend="ruledefinition"
1385
 
>definition</link
1386
 
>. </para>
1387
 
        <sect1 id="rulegroups">
1388
 
        <title
1389
 
>Rule Groups</title>
1390
 
        <para
1391
 
>There are several groups of rules:</para>
1392
 
        <variablelist>
1393
 
                <varlistentry>
1394
 
                        <term
1395
 
>Meld Rules</term>
1396
 
                        <listitem
1397
 
><para
1398
 
>Meld rules are applied to single melds independent of the rest of the hand. </para
1399
 
></listitem>
1400
 
                </varlistentry>
1401
 
                <varlistentry>
1402
 
                        <term
1403
 
>Hand Rules</term>
1404
 
                        <listitem
1405
 
><para
1406
 
>Hand rules are applied to the entire hand, for all players. </para
1407
 
></listitem>
1408
 
                </varlistentry>
1409
 
                <varlistentry>
1410
 
                        <term
1411
 
>Mah Jong Rules</term>
1412
 
                        <listitem
1413
 
><para
1414
 
>Mah Jong rules specify how a winnable hand has to look like. This is normally four melds with 3 or 4 tiles each and a pair. But special hands may look differently, for example the 13 Orphans in Classical Chinese. </para
1415
 
></listitem>
1416
 
                </varlistentry>
1417
 
                <varlistentry>
1418
 
                        <term
1419
 
>Winner Rules</term>
1420
 
                        <listitem
1421
 
><para
1422
 
>Winner rules are applied to the entire hand but only for the winner. This includes most special hands. Those rules do not have to enforce the correct number of tiles. </para
1423
 
></listitem>
1424
 
                </varlistentry>
1425
 
                <varlistentry>
1426
 
                        <term
1427
 
>Options</term>
1428
 
                        <listitem
1429
 
><para
1430
 
>Here you can find several special parameters like points for a limit hand. </para
1431
 
></listitem>
1432
 
                </varlistentry>
1433
 
                <varlistentry>
1434
 
                        <term
1435
 
>Penalties</term>
1436
 
                        <listitem
1437
 
><para
1438
 
>Penalties are applied manually by the user. </para
1439
 
></listitem>
1440
 
                </varlistentry>
1441
 
        </variablelist>
1442
 
        <sect2 id="executionorder"
1443
 
><title
1444
 
>Order of Execution</title>
1445
 
        <para>
1446
 
                <itemizedlist>
1447
 
                        <listitem
1448
 
><para
1449
 
>build a list of applicable rules from meld rules and hand rules</para
1450
 
></listitem>
1451
 
                        <listitem
1452
 
><para
1453
 
>using the Mah Jong rules find out if the declared winner hand is really a winner hand.</para
1454
 
></listitem>
1455
 
                        <listitem
1456
 
><para
1457
 
>for the winner append applicable winner rules</para
1458
 
></listitem>
1459
 
                        <listitem
1460
 
><para
1461
 
>if some of the found rules have the action '&absolute;', only keep those. It is yet undefined what happens if more than one is found.</para
1462
 
></listitem>
1463
 
                        <listitem
1464
 
><para
1465
 
>if some of the rules define limits, throw away all others</para
1466
 
></listitem>
1467
 
                        <listitem
1468
 
><para
1469
 
>apply the found rules in that order</para
1470
 
></listitem>
1471
 
                </itemizedlist>
1472
 
        </para>
1473
 
        </sect2>
1474
 
        </sect1>
1475
 
        <sect1 id="ruledefinition">
1476
 
        <title
1477
 
>The Definition</title>
1478
 
        <para
1479
 
>The definition is one single string because we want to make it easy to save it in a data base. It consists of several parts separated by the two characters "||". A part expresses either a condition under which the rule applies or it expresses some actions. Only one part for actions may be defined, but several condition expressions. The rule applies as soon as at least one condition expression matches the hand.</para
1480
 
><para
1481
 
>&kajongg; comes with a predefined ruleset implementing the Classical Chinese rules as defined by the German DMJL. That should give you a lot of examples.</para
1482
 
><para
1483
 
>These are all recognized parts:</para>
1484
 
        <variablelist>
1485
 
                <varlistentry>
1486
 
                        <term
1487
 
>Variable Case Regular Expression</term>
1488
 
                        <listitem
1489
 
><para
1490
 
>A part starting with I is a <link linkend="regex"
1491
 
>Regular Expression</link
1492
 
> making no difference between upper/lowercase. However case is only ignored in the first, main part of the regular expression. For the parts starting with m,M,x or L, case always matters. </para
1493
 
></listitem>
1494
 
                </varlistentry>
1495
 
                <varlistentry>
1496
 
                        <term
1497
 
>Action</term>
1498
 
                        <listitem
1499
 
><para
1500
 
>A part starting with A is a list of <link linkend="actions"
1501
 
>Actions</link
1502
 
>. </para
1503
 
></listitem>
1504
 
                </varlistentry>
1505
 
                <varlistentry>
1506
 
                        <term
1507
 
>Manual Expression</term>
1508
 
                        <listitem
1509
 
><para
1510
 
>A part starting with M is an optional <link linkend="regex"
1511
 
>Regular Expression</link
1512
 
>. For scoring manual games, it defines whether this rule should be selectable by the user with a check box. The leading M does not belong to the Regular Expression. An example would be the Rule "Last Tile Taken from Dead Wall". </para
1513
 
></listitem>
1514
 
                </varlistentry>
1515
 
                <varlistentry>
1516
 
                        <term
1517
 
>Function</term>
1518
 
                        <listitem
1519
 
><para
1520
 
>A part starting with F is a function. Sometimes regular expressions would be too complicated or too slow. In such cases the rule is encoded in the program itself, and it can be referenced here by giving its function name. As of now, only one function <literal
1521
 
>LastOnlyPossible</literal
1522
 
> is defined. This function determines if the last tile was the only tile possible for winning. </para
1523
 
></listitem>
1524
 
                </varlistentry>
1525
 
                <varlistentry>
1526
 
                        <term
1527
 
>Regular Expression</term>
1528
 
                        <listitem
1529
 
><para
1530
 
>Any other part is a <link linkend="regex"
1531
 
>Regular Expression</link
1532
 
>. </para
1533
 
></listitem>
1534
 
                </varlistentry>
1535
 
        </variablelist>
1536
 
        </sect1>
1537
 
        <sect1 id="regex">
1538
 
        <title
1539
 
>Regular Expressions</title>
1540
 
        <para
1541
 
>Regular expressions are a very powerful programming tool for matching strings of characters. Powerful but also quite difficult. This is not for the normal game player. There are books available which do nothing else but explain regular expressions.</para>
1542
 
        <para
1543
 
>There are several dialects of regular expressions. &kajongg; is written in the programming language Python. Since the Python standard library contains a module for regular expressions, this is the dialect we use. </para
1544
 
><para
1545
 
>For details see <ulink url="http://docs.python.org/library/re.html#regular-expression-syntax"
1546
 
></ulink
1547
 
> </para
1548
 
><para
1549
 
>Everything about a hand that might have an influence on the score is encoded in one single string. Then &kajongg; checks if the regular expression matches this string. If it does, the rule is applied.</para>
1550
 
        <para
1551
 
>As an example, this regular expression matches the limit hand "All Greens":</para
1552
 
><programlisting
1553
 
>( |[bB][23468]|[dD]g)*[fy/]</programlisting>
1554
 
        <sect2
1555
 
><title
1556
 
>Structure of a Hand String</title>
1557
 
        <para
1558
 
>The content of a hand string is always the same no matter what language you use on your desktop.</para>
1559
 
        <para
1560
 
>The string representing a hand consists of several parts separated by a space. The order of those parts is always the same except for the meld parts at the beginning.</para>
1561
 
        <para
1562
 
>&kajongg; is able to regroup concealed tiles into melds aiming to get a higher score. It does not matter how the concealed tiles are grouped for this to work. However when it comes to limit hands this might fail. That is why &kajongg; will try the original grouping of tiles as entered by the user and also the regrouped tiles. For both variants, all rules are applied. The variant achieving the higher total score is used.</para>
1563
 
        <para
1564
 
>Here comes an example. This is really only one line but split here for better readability. Moreover this sentence is repeated once because some regular expressions are much easier to write if the parts can be referenced in another order. See the rule for Robbing the Kong: Its regular expression first looks at the L group (Last Tile) before looking at the melds.</para
1565
 
><programlisting
1566
 
><literal
1567
 
>c1c1c1C1 s1s2s3 b6b6b7b7b8b8 b5b5 fn yn
1568
 
/c416s000b000b000b200 -C416s000b000b000b200 %n Mneka LB5B5B5</literal
1569
 
></programlisting>
1570
 
<para
1571
 
>A tile is represented by 2 characters. The first one is s for stone, b for bamboo, c for character, w for wind, d for dragon, y for season bonus, f for flower bonus. The second one is 1..9 for the suits, e,s,w,n for the winds, w,r,g for the dragons (white, red, green) and 1,2,3,4 for the bonus tiles. Exposed tiles have the first character in lowercase, concealed tiles have it in uppercase.</para>
1572
 
<para
1573
 
>All the following parts are always present in this order except the part "Last Tile": This one exists only for the winner hand. <variablelist>
1574
 
                <varlistentry>
1575
 
                        <term
1576
 
>Meld</term>
1577
 
                        <listitem
1578
 
><para
1579
 
>The part starting with any of the characters <literal
1580
 
>sbcdwSBCDW</literal
1581
 
> is a meld. A meld holds any number of tiles. &kajongg; will split melds with too many tiles trying to maximize the score.</para
1582
 
><para
1583
 
>We use a special syntax for kongs: c1c1c1c1 is an open kong. c1c1c1C1 is an open kong, 4th tile was called for, completing a concealed pung. This is needed for the limit game 'concealed true color game'. c1C1C1c1 is a concealed declared kong. C1C1C1C1 would be a concealed undeclared kong. But since it is undeclared, it is counted as a pung. So this meld will be split into pung C1C1C1 and single C1.</para
1584
 
><para
1585
 
>Bonus tiles appear after all other melds.</para
1586
 
></listitem>
1587
 
                </varlistentry>
1588
 
                <varlistentry>
1589
 
                        <term
1590
 
>Summary</term>
1591
 
                        <listitem
1592
 
><para
1593
 
>The part starting with / holds summary information about the melds. This makes it easier to write some regular expressions. Every meld is represented by four characters. The first character is one out of <literal
1594
 
>sbcdwSBCDW</literal
1595
 
>, again lowercase for exposed and uppercase for concealed. The second character is a number saying how many tiles the meld holds. This is 1 up to 4 for a kong. The 0 is used for a chow. The last two characters hold the scoring points for this meld. </para
1596
 
></listitem>
1597
 
                </varlistentry>
1598
 
                <varlistentry>
1599
 
                        <term
1600
 
>Alternate summary</term>
1601
 
                        <listitem
1602
 
><para
1603
 
>The part starting with - is identical to the above summary but it contains claimed kongs as concealed kongs. Some rules like "Three Concealed Pongs" treat a claimed kong as being concealed. </para
1604
 
></listitem>
1605
 
                </varlistentry>
1606
 
                <varlistentry>
1607
 
                        <term
1608
 
>Hand length</term>
1609
 
                        <listitem
1610
 
><para
1611
 
>The part starting with % holds information about the length of the hand: s is a short hand having too few tiles, n is a hand with the correct number of tiles, l is a long hand having too many tiles. </para
1612
 
></listitem>
1613
 
                </varlistentry>
1614
 
                <varlistentry>
1615
 
                        <term
1616
 
>Mah Jong</term>
1617
 
                        <listitem
1618
 
><para
1619
 
>The part starting with m, M or x holds additional information. M stands for the winner hand, m for a loser hand, and x stands for a hand that is forbidden to say Mah Jong. M/m/x is followed by one character for the own wind, one character for the prevailing wind, one character for the source of the last tile leading to Mah Jong, one character for the declarations a player made.</para
1620
 
><para
1621
 
>These are the possible sources of the last tile: w=wall, d=discarded, e=dead end, z=last tile of living end, Z=last tile of living end, discarded, k=robbing the kong, 1=blessing of heaven/earth. The values w and d are special - they are sort of intermediate values. By choosing a concealed tile as last tile, the source is set to w. Next, several rules say that they apply only if the last tile comes from the wall. So this allows for a better preselection of actually applicable manual rules. For a better understanding, please look at the manual rules and read up about the <link linkend="actions"
1622
 
>action</link
1623
 
> &lastsource;.</para
1624
 
> <para
1625
 
>These are the possible declarations: a=call at beginning, t=twofold fortune. </para
1626
 
></listitem>
1627
 
                </varlistentry>
1628
 
                <varlistentry>
1629
 
                        <term
1630
 
>Last Tile</term>
1631
 
                        <listitem
1632
 
><para
1633
 
>The part starting with L holds information about the last tile. It contains the last tile itself, followed by the meld that was completed with the last tile. We need this last meld for the rule "Last Tile is the Only Possible" because sometimes knowing only the last tile is not sufficient. Note that the last meld cannot be a Kong because if it completes a Kong you have to draw a replacement tile. </para
1634
 
></listitem>
1635
 
                </varlistentry>
1636
 
                <varlistentry>
1637
 
                        <term
1638
 
>Calling Limit Hand</term>
1639
 
                        <listitem
1640
 
><para
1641
 
>This is not yet implemented but might be needed for rules like defined by the BMJA (in England). A part starting with K holds all possible tiles to be checked for if we give points for a calling limit hand. We could use brute force and check with every tile but that might take too much time. </para
1642
 
></listitem>
1643
 
                </varlistentry>
1644
 
        </variablelist>
1645
 
        </para>
1646
 
        </sect2>
1647
 
        </sect1>
1648
 
        <sect1 id="actions">
1649
 
        <title
1650
 
>Actions</title>
1651
 
        <para
1652
 
>All actions for a rule are defined in one string. They are separated by spaces. Some of them define a value. </para>
1653
 
        <variablelist>
1654
 
                <varlistentry>
1655
 
                        <term
1656
 
>&payforall;</term>
1657
 
                        <listitem
1658
 
><para
1659
 
>The player did something very nasty, so she must pay for all. Yet this is not a penalty since the sum of payments is the same - only the payer changes. Also, the two payers not involved do not exchange payments. </para
1660
 
></listitem>
1661
 
                </varlistentry>
1662
 
                <varlistentry>
1663
 
                        <term
1664
 
>&payers;=X</term>
1665
 
                        <listitem
1666
 
><para
1667
 
>Defines how many payers this penalty rule implies. X is a number. </para
1668
 
></listitem>
1669
 
                </varlistentry>
1670
 
                <varlistentry>
1671
 
                        <term
1672
 
>&payees;=X</term>
1673
 
                        <listitem
1674
 
><para
1675
 
>Defines how many payees this penalty rule implies. X is a number. </para
1676
 
></listitem>
1677
 
                </varlistentry>
1678
 
                <varlistentry>
1679
 
                        <term
1680
 
>&absolute;</term>
1681
 
                        <listitem
1682
 
><para
1683
 
>This action defines an absolute payment. The hand score is ignored. Used for penalty rules. </para
1684
 
></listitem>
1685
 
                </varlistentry>
1686
 
                <varlistentry>
1687
 
                        <term
1688
 
>&lastsource;</term>
1689
 
                        <listitem
1690
 
><para
1691
 
>This action defines the source of the last tile. Used by manual rules like "last tile from dead end". Setting the last source with this action serves as a filter for other rules - if they trigger only for certain sources. Those other rules can of course also be manual rules. So this filtering will narrow down the amount of manual rules the user gets shown in the scoring dialog. If this seems complicated, just play around with the scoring dialog and watch check boxes appear and disappear depending on the source of the last tile. </para
1692
 
></listitem>
1693
 
                </varlistentry>
1694
 
        </variablelist>
1695
 
        </sect1>
1696
 
</chapter>
1697
 
 
1698
1471
<appendix id="problems"
1699
1472
><title
1700
1473
>Відомі проблеми</title>
1711
1484
><para
1712
1485
>Комп’ютерні гравці все ще грають доволі слабко.</para
1713
1486
></listitem>
1714
 
                <listitem
1715
 
><para
1716
 
>The names of the computer players are not yet customizable.</para
1717
 
></listitem>
1718
1487
        </itemizedlist>
1719
1488
</appendix>
1720
1489
 
1778
1547
>&kajongg; для &kde; </para>
1779
1548
 
1780
1549
        <para
1781
 
>Program Copyright &copy; 2009, 2010, 2011 <personname
 
1550
>Авторські права на програму належать &copy; 2009, 2010, 2011, 2012 <personname
1782
1551
><firstname
1783
1552
>Wolfgang</firstname
1784
1553
><surname
1788
1557
>wolfgang@rohdewald.de</email
1789
1558
> </para>
1790
1559
        <para
1791
 
>Documentation Copyright &copy; 2009, 2010, 2011 <personname
 
1560
>Авторські права на документацію належать &copy; 2009, 2010, 2011, 2012 <personname
1792
1561
><firstname
1793
1562
>Wolfgang</firstname
1794
1563
><surname
1861
1630
></listitem>
1862
1631
        <listitem
1863
1632
><para
1864
 
>Python 2.5 or higher (python)</para
 
1633
>Python 2.6 або новіша версія (python)</para
1865
1634
></listitem>
1866
1635
        <listitem
1867
1636
><para