Игра тысяча 1000 онлайн
Правила игры "Тысяча" 1000
Тысяча – карточная взяточная игра, на двух или трех игроков. В реальной жизни существует вариация игры на 4-х игроков, но в связи с тем, что она весьма специфична на данном проекте игра на четверых не реализована.
Данные правила игры ориентированы на игровой проект "IgraFan" и описываются правила игры на данном проекте. Но для полноты и общей информации описываются также правила игры, используемые в реальной жизни при игре в живую. Данные абзацы не относятся к текущему проекту и не обязательны для прочтения – они выделены курсивным шрифтом и серым цветом.

Для игры используется стандартная колода из 36 карт с убранными шестерками, семерками и восьмерками. Игра длится несколько раздач (раундов) пока один из игроков не наберёт нужное число очков для победы как правило это 1000 (1001) очков. Каждая раздача (раунд) состоит из нескольких этапов:
  1. Раздача карт.
  2. Торговля.
  3. Снос.
  4. Заказ.
  5. Розыгрыш.
В процессе последнего этапа «Розыгрыша» игроки получают взятки. Взятка – несколько карт, выложенных на стол каждым из партнеров за один ход, которые, в соответствии с правилами игры, должен взять игрок, выложивший старшую карту. Результатом каждого раунда являются набранные взятки – карты. Каждая карта имеет свою ценность в виде игровых очков. В соответствии с этим каждая карта оценивается и определяется общая сумма очков набранная каждым из игроков.
Ценность (старшинство) карт:
Девятка - 0 игровых очков.
девятка пик девятка треф девятка бубей девятка червей

Валет - 2 игровых очка.
валет пик валет треф валет бубей валет червей

Дама - 3 игровых очка.
дама пик дама треф дама бубей дама червей

Король - 4 игровых очка.
король пик король треф король бубей король червей

Десятка - 10 игровых очков.
десятка пик дестка треф десятка бубей десятка червей

Туз - 11 игровых очков.
туз пик туз треф туз бубей туз червей
Марьяж (Хвала):
Марьяж является неотъемлемой частью игры. В «Тысяче» существует два типа марьяжей: козырный и тузовый. Козырный марьяж обычно принято называть «хваль» или «хвалёнка» от понятия «захвалить (объявить) козырь». Козырный марьяж является основным аспектом игры. Козырным марьяжем считается король и дама одной масти на руках у одного игрока. Вся игра построена на использовании козырных марьяжей и каждый игрок стремится их получить, поскольку объявление козырного марьяжа («захваление козыря») приносит игроку очки, равные стоимости марьяжа. Кроме того, объявление марьяжа назначает козырь в текущем кону и все карты той же масти что и объявленный марьяж становятся козырными, то есть бьют любую другую масть. Очки за объявленные марьяжи прибавляются к сумме очков, набранных посредством взяток. Очки за объявление нескольких марьяжей в течение одного кона суммируются.

Пиковый марьяж - дама и король пик стоимость 40 очков.
дама пик король пик

Трефовый марьяж - дама и король треф стоимость 60 очков.
дама треф король треф

Бубновый марьяж - дама и король бубей стоимость 80 очков.
дама бубей король бубей

Червовый марьяж - дама и король червей стоимость 100 очков.
дама червей король червей

Иногда может использоваться вариант игры, в котором присутствует тузовый марьяж. На данном проекте тузовый марьяж включается параметром конвенции при создании игры.
Тузовый марьяж - четыре туза стоимость 200 очков.
Туз пик Туз треф Туз бубей Туз червей
Раздача карт
В начале каждого раунда сдающий игрок раздает всем участникам по семь(7) карт при игре на троих и по десять(10) карт в случае игры на двоих. Раздача происходит по очереди по одной карте, начиная от игрока, сидящего слева от раздающего и далее по часовой стрелке. При этом между, первым и последним кругом раздачи, сдающий выкладывает по одной карте на стол рубашкой в верх - прикуп. Прикуп – карты, отложенные отдельно на стол. В случае игры на троих формируется один прикуп из трех карт, в случае игры на двоих формируется два отдельных прикупа по две карты каждый. Таким образом раздаются все 24-ре карты. После раунда сдающий игрок меняется, им становится следующий, сидящий слева игрок от текущего сдающего.
[?] При игре в реальности сдающий игрок перед тем как приступить к раздаче карт должен дать сдвинуть («срезать») колоду игроку, сидящему по правую руку от него (обычно запрещается сдвигать одну карту, хотя бывают разные вариации). После этого сдающий перемещает сдвинутую часть колоды под остальные карты и смотрит последнюю карту в колоде (в этом ничего нет, эта карта всё равно достанется ему). В случае, если последняя карта — девятка, то сдающий показывает её всем игрокам (поскольку сдвиг на девятку не желателен и может привести к штрафу, сдающий по своему желанию может озвучивать это событие театральной фразой типа: «девять раз»/«девять два», «сорок» (первая девятка)/«восемьдесят» (вторая девятка) (имеется в виду сумма штрафа за три сдвинутые девятки подряд равная 120 очкам) и даёт сдвинуть ещё раз (в некоторых компаниях при двух сдвинутых девятках подряд принято положить колоду на стол, дабы сдвигающий сам сдвинул и снял часть колоды и положил рядом с оставшимися картами, только после этого сдающий помещает сдвинутую часть колоды вниз оставшихся карт); если девятка выпадает три раза подряд, сдвигавшему начисляется штраф в 120 очков. Если последняя карта — валет, то сдающий показывает его другим игрокам и перекладывает карту в середину колоды («женит валета») и начинает раздавать (при этом последняя карта уже не смотрится). В некоторых компаниях принято вытащить валета (если он оказался внизу) и щёлкнуть им по носу сдвигающего, в некоторых компаниях принято «щёлкать по носу» целой колодой… Подобные действия требуют определённой сноровки и знаний игрока о нюансах правил игры.
Раздача карт осуществляется по одной карте по часовой стрелке и начинается с игрока, сидящего по левую руку от сдающего. В ходе раздачи необходимо положить три карты в прикуп. При игре втроем запрещается класть в прикуп последнюю карту. Если в ходе раздачи хоть одна карта оказалась вскрытой (будь то по неосторожности либо специально), либо последняя карта не оказалась в прикупе (при игре вчетвером), то раздающему записывается штраф в размере 120 очков (термин «бардак на столе») и карты переходят к следующему игроку для раздачи на игру. То же правило действует в том случае, если сдающий не дал сдвинуть колоду «правой руке» (сидящему справа) и начал раздачу карт. В некоторых случаях (по договорённости) карты не переходят к следующему игроку на раздачу, раздавать карты продолжает оштрафованный игрок.
При игре втроём сдающий должен раздать карты по одной по часовой стрелке так, чтобы последняя карта (которую он смотрел) досталась ему.
При игре вчетвером сдающий игрок раздаёт колоду себе на прикуп (термин «сидящий на прикупе») в количестве трех карт и в игре сдающий не участвует. При игре вчетвером сдающий обязан положить последнюю карту себе, то есть в прикуп, поскольку он её смотрел (правило сдвига колоды, см. выше). При игре вчетвером сдающий не имеет права каким-либо образом делиться своим знанием с другими игроками, в противном случае он штрафуется вычетом из счёта 120 очков (либо более по договорённости) и раздача переходит к другому игроку.
При игре втроём или вчетвером каждый игрок получает на руки семь карт. Выигравший торги забирает прикуп из трёх карт, после чего обязан отдать двум другим игрокам по одной любой карте по своему усмотрению, это называется «снос карт». Таким образом у всех игроков образуется равное количество карт.
При игре вчетвером сдающий («сидящий на прикупе») не принимает участия в игре, и потому автоматически получает заранее оговоренное количество очков:
  • сдающий получает очки, равные сумме очков в прикупе (с учётом округления);
  • если при раздаче в прикупе оказался марьяж, то его стоимость суммируется с общим количеством очков в прикупе.
Торговля
После раздачи карт игроки оценивают свои карты и объявляют ставки за прикуп. Под заявлением ставки подразумевается объявление количества очков, которые игрок обязуется взять в текущем раунде(кону). Торговлю начинает игрок сидящий следующим от сдающего по часовой стрелке (слева от сдающего). Данный игрок называется «первая рука» и обязан объявить ставку минимум в 100 очков. В различных вариациях игры «первая рука» обязан заявить ставку именно в 100 очков, при некоторых — имеет право заявить любую доступную ему ставку. Далее игроки по очереди по часовой стрелке объявляют свои ставки, либо отказываются от торгов («пасуют»). Нарушать очерёдность торгов нельзя. Если игрок спасовал, он выбывает из торгов и далее торги продолжаются без него с оставшимися игроками.
Любая заявленная ставка должна быть кратна пяти(5). Например, 100, 115, 120. [?] В некоторых разновидностях игры в жизни торги идут с шагом в 5 очков, то есть каждый игрок может повышать ставку только на 5 очков (100-105-110-115-120 и т. д.). На данном проекте участвующий в торговле игрок вправе заявить любую доступную ему для заявки сумму очков. Торговля продолжается пока не останется один игрок ставку, которого не смогли перебить остальные игроки. Данный игрок является победителем торгов.
Во время торгов существуют правила, ограничивающие количество очков, которые может заявить игрок:
  • игрок не может делать ставку более 120 очков не имея на руках марьяжа;
  • игрок не может делать ставку более 160 очков, если имеет на руках только пиковый марьяж;
  • игрок не может делать ставку более 180 очков, если имеет на руках только трефовый марьяж;
  • игрок не может делать ставку более 200 очков, если имеет на руках только бубновый марьяж;
  • игрок не может делать ставку более 220 очков, если имеет на руках только червовый марьяж.
На данном проекте программа ограничивает максимальную сумму объявленной ставки суммой 120 + сума всех имеющихся на руках марьяжей.
[?] При игре в реальности, если игрок заявил ставку с нарушением этих правил, то с его счёта списывается заявленное количество очков, а раздача переходит к следующему по очереди игроку. В некоторых случаях (оговаривается отдельно) другим игрокам записывается по 60 очков играющим.
Снос
Игрок выигравший торги забирает прикуп в случае игры на троих – это один прикуп состоящий из трех карт. В случае игры на двоих игрок выбирает один прикуп из двух возможных на свой выбор. При заборе прикупа, карты прикупа показываются всем игрокам, исключение составляет объявление игры в 100 очков, которую «пропасовали» остальные игроки ("сидящий на сотне") — тогда прикуп не вскрывается. На данном проекте показывается прикуп или нет в случае "сидящий на сотне" определяется параметрами игры при создании. В случае игры на двоих показывается только выбранный игроком прикуп, который он забирает, второй прикуп остается лежать на столе рубашками в верх. Игрок забравший прикуп отдает(сносит) по одной любой карте из своих карт каждому игроку. Карты сносятся в закрытую. Таким образом у каждого игрока получается по девять(9) карт на руках в случае игры на троих и по одиннадцать(11) карт на руках в случае игры на двоих.
Если в прикупе были только девятки или у кого-либо из игроков, на руках, есть 4 девятки или менее 14 очков игрок может попросить пересдать карты. На данном проекте возможность пересдачи устанавливается в параметрах игры.
Заказ
После сноса игрок, выигравший торги, должен сделать окончательный заказ (ставку) на которую он идет. Заказ (ставка) не может быть ниже чем указанная при торгах. Она может быть только равной либо большей.
В случае если игрок видит, что он не может набрать заявленную ставку, он может объявить о росписи – «расписать игру». Правило «расписать игру» устанавливается в параметрах конвенции при создании игры. При этом также в параметрах игры устанавливается «штраф на росписи». В случае, если параметр стоит "ДА", то по факту росписи игры, игрок получает штраф в размере сделанной при торговле ставки, его противники получают по 50% от заказанной игры. В случае, если параметр стоит "НЕТ", то по факту росписи игры, игрок получает одну палку, его противники получают по 50% от заказанной игры. На "бочке" расписывать игру нельзя.
Розыгрыш
Каждый игрок, начиная с выигравшего торги, затем по часовой стрелке, выкладывает на стол по одной карте. Первый игрок выкладывает любую карту из своей руки по своему усмотрению. Первая выложенная карта определяет заходную масть. Все последующие игроки должны выложить любую карту той же масти, если нет карт с той же мастью, тогда обязаны положить козырь, если нет козырей тогда любую карту любой масти. Когда все положили по одной карте на стол, игрок, положивший самый старший козырь либо если нет на столе козырей самую старшую карту заходной масти, забирает выложенные карты на столе – забирает взятку. Старшинство карт смотрите здесь. Следующий ход начинает делать игрок забравший взятку. Розыгрыш идет пока у игроков не закончатся карты на руках.
На данном проекте программа не позволяет игроку выложить не правильную карту. При игре в жизни, если игрок начинает мухлевать и класть карту неправильной масти при наличии карт заходной масти или при наличии козырей, то за подобные действия игрок получает штраф в общий зачет - минус 120 очков. При этом взятые им взятки не учитываются в подсчете итога раунда.
В игре существуют специальные комбинации – дама и король одной масти. Такие комбинации называются марьяж или хвала(хвалёнка). Хвалу можно в процессе розыгрыша «захвалить». Для этого игроку выигравшему взятку нужно зайти с любой карты марьяжа - с дамы или короля и объявить об этом другим игрокам. На данном проекте при заходе с карты марьяжа, марьяж объявляется автоматически. При этом масть хвалы устанавливает новый козырь, и игрок получает очки к взяткам в раунде за объявления хвалы. Количество полученных очков определятся мастью марьяжа(хвалы). Подробнее о марьяже смотрите здесь.
На первом ходе запрещено объявлять марьяж, в этом случае заход с карты марьяжа будет считаться обычным ходом, как будто у игрока нет остальных карт марьяжа.
Итоги раунда (кона), подсчет очков
По завершению раунда происходит подсчёт взятых очков — взятки плюс стоимость объявленных марьяжей. Каждый игрок подсчитывает сумму набранных им карт. Это сумма номиналов (стоимости) набранных карт. Данная сумма набранных очков округляется кратно пяти(5) вниз при двух(2) очках и вверх при трёх(3) очках. Правило округления действует только для обычных игроков, для игрока, выигравшего торги округление не действует. Если он не добрал до заказанной суммы хотя-бы одно очко, то считается, что он не набрал заказанной суммы.
Если выигравший торги игрок набрал заявленную сумму очков, она начисляется ему на счёт, если нет — списывается с его счёта. Всем остальным игрокам начисляются набранные ими очки.

Правило «Палка» («Болт») Если в процессе розыгрыша кона игрок не взял ни одной взятки, ему записывается «палка»(«болт»). На данном проекте за три палки в течение игры с игрока списывается 120 очков, палки аннулируются, а при повторном получении 3х палок в любых раздачах процедура повторяется.
[?] В жизни существую варианты при которых:
  • за три палки подряд с игрока списывается 120 очков, при этом предыдущие «палки» аннулируются. При повторном получении 3х «палок» процедура повторяется;
  • игроку начисляется штраф в 120 (или более в зависимости от договорённостей) очков за каждую пятую «палку»(«болт») в игре.
Правила игры на бочке:
Если общая сумма очков игрока превысит 880, то начисление ему последующих очков прекращается, игрок садится на "бочку".
  1. Игрок, находящийся на "бочке" получает прикуп в зависимости от значения параметра конвенции стола "Торговля на бочке"
  2. Игрок, находящийся на "бочке" обязан набрать 121 очко.
  3. Игрок, находящийся на "бочке" имеет три попытки сыграть 121 очко. При этом при двух неудачных попытках ему не начисляются штрафные очки. Если и третья попытка не принесла успеха, то игрок слетает с "бочки" и с игрока снимается 120 очков, в актив игрока записывается одна несыгранная бочка
  4. Если на "бочку" залезает другой игрок, то игрок сидящий на бочке сбрасывается с нее, с игрока сидевшего на бочке снимается 120 очков.
  5. Если бочкующий играет игру со ставкой 121, независимо от того сыграл игрок “бочку” или нет, у соперников не учитываются ни очки, ни палки в этом круге. Они “стоят на месте”.
  6. Если 2 или 3 игрока одновременно попадают на бочку, то все они с нее скатываются, с каждого игрока снимается 120 очков.
  7. Если на "бочке", другим игроком, будет перекуплена ставка бочкующего, то бочкующий не получит очков, палок по итогам раунда
  8. Если на "бочке", бочкующим, будет поднята ставка и выиграна торговля, то, в случае, если он не возьмет указанную при торговле ставку, бочкующий получает штраф в размере ставки и слетает с "бочки".
Параметры конвенции стола:
- Пересдача: ДА/НЕТ
В случае, если параметр стоит "ДА", то после сноса карт сервер проверяет на пересдачу. Если в прикупе были только девятки или у кого-либо из игроков, на руках, есть 4 девятки или менее 14 очков игрок может попросить пересдать карты.

- Торговля на бочке: ДА/НЕТ
В случае, если параметр стоит "ДА", то торговля идет как обычно, при этом играющий бочку, автоматом заявляет игру на 121 очко, если "НЕТ", то играющий бочку заявляет игру на 121 и берет прикуп, торговля другим игрокам не предоставляется.

- Тузовый марьяж: ДА/НЕТ
В случае, если параметр стоит "ДА", то в игре действует тузовый марьяж. Тузовый марьяж это 4 туза, стоимость марьяжа 200 очков. На данный марьяж распространяются правила обычного марьяжа, т.е. такой марьяж нельзя объявить на первом ходе.

- Торговля в минусе: -100/-200/-300/-1000
Если игрок набрал игровых очков меньше, чем указано в этом параметре, то игрок автоматически говорит пас при торговле.

- Показывать прикуп: ДА/НЕТ
В случае, если параметр стоит "ДА", то прикуп отображается противникам, если его берет "сидящий на сотне"

- Расписать: ДА/НЕТ
Если игрок видит, что он заведомо не может набрать указанную при торговле ставку, он может расписать игру. Смотри "Штраф на росписи". На "бочке" расписывать игру нельзя.

- Штраф на росписи: ДА/НЕТ
В случае, если параметр стоит "ДА", то по факту росписи игры, игроку получает штраф в размере сделанной при торговле ставки, его противники получают по 50% от заказанной игры. В случае, если параметр стоит "НЕТ", то по факту росписи игры, игроку получает одну палку, его противники получают по 50% от заказанной игры.

- Самосвал: ДА/НЕТ
В случае, если параметр стоит "ДА", то при достижении любым игроком после очередного раунда 555 или -555 очков, очки этого игрока становятся равным 0.

- Золотой кон: ДА/НЕТ
В случае, если параметр стоит "ДА", то набранные и не набранные очки в первых трех раундах, в партии умножаются на два.
The rules of the game "Thousand" 1000 (Russian Schnapsen)
Thousand is a card trick game for two or three players. In real life, there is a variation of the game for 4 players, but due to the fact that it is very specific on this project, the game for four is not implemented.
These rules of the game are focused on the game project "IgraFan" and describe the rules of the game for this project. But for completeness and general information, the rules of the game used in real life when playing live are also described. These paragraphs are not relevant to the current project and are not required reading - they are in italic and grayed out.

The game uses a standard deck of 36 cards with sixes, sevens and eights removed. The game lasts several hands (rounds) until one of the players scores the required number of points to win, usually 1000 (1001) points. Each distribution (round) consists of several stages:
  1. Deal of cards.
  2. Bidding.
  3. Discarding cards.
  4. Order.
  5. Drawing.
During the last stage of the "Drawing", players receive bribes. A bribe is a few cards laid out on the table by each partner in one move, which, in accordance with the rules of the game, must be taken by the player who laid out the highest card. The result of each round is the collected bribes - cards. Each card has its own value in the form of game points. Accordingly, each card is evaluated and the total amount of points scored by each of the players is determined.
Game scores — rank values:
Nine - 0 game points.
Nine of Spades Nine of Clubs Nine of Diamonds Nine of Hearts

Jack (or Unter) - 2 game points.
Jack of Spades Jack of Clubs Jack of Diamonds Jack of Hearts

Queen (or Ober) - 3 game points.
Queen of Spades Queen of Clubs Queen of Diamonds Queen of Hearts

King - 4 game points.
King of Spades King of Clubs King of Diamonds King of Hearts

Ten - 10 game points.
Ten of Spades Ten of Clubs Ten of Diamonds Ten of Hearts

Ace - 11 game points.
Ace of Spades Ace of Clubs Ace of Diamonds Ace of Hearts
Marriage:
Marriage is an integral part of the game. In "Thousand" there are two types of marriages: trump and ace. Trump Marriage is the main aspect of the game. A king and a queen of the same suit in the hands of one player are considered to be trump marriages. The whole game is built on the use of trump margins, and each player seeks to get them, since the announcement of the trump margin ("boasting the trump") brings the player points equal to the value of the margin. In addition, the announcement of the margin appoints the trump card in the current bet, and all cards of the same suit as the declared margin become trump cards, that is, they beat any other suit. Points for announced marriages are added to the total of points scored through bribes. Points for declaring several margins during one round are summed up.

Spade Marriage - Queen and King of Spades cost 40 points.
Queen of Spades King of Spades

Club Marriage - Queen and King of Clubs cost 60 points.
Queen of Clubs King of Clubs

Diamonds Marriage - Queen and King of Diamonds cost 80 points.
Queen of Diamonds King of Diamonds

Hearts Marriage - Queen and King of Hearts cost 100 points.
Queen of Hearts King of Heartss

Sometimes game option can be used, in which there is aces marriage. On this project aces marriage includes parameters convention when creating a game.
Ace Marriage - four aces worth 200 points.
Ace of Spades Ace of Clubs Ace of Diamonds Ace of Hearts
Deal of cards
At the start of each round, the dealer deals seven (7) cards to all players for a three-player game and ten (10) cards for a two-player game. The distribution takes place in turn, one card at a time, starting from the player to the left of the dealer and further clockwise. In this case, between the first and last round of distribution, the dealer lays out one card on the table face down - buy. Prikup - cards set aside separately on the table. In the case of a game for three, one prikup of three cards is formed, in the case of a game for two, two separate prikups of two cards each are formed. Thus, all 24 cards are dealt. After the round, the dealer changes to the next player to the left of the current dealer.
[?] When playing in reality, the dealer, before starting to deal cards, must allow the player sitting to his right hand to move (“cut”) the deck (usually it is forbidden to move one card, although there are different variations). After that, the dealer moves the shifted part of the deck under the rest of the cards and looks at the last card in the deck (there is nothing in this, this card will still go to him). If the last card is a nine, then the dealer shows it to all players (since a shift by a nine is not desirable and can lead to a penalty, the dealer at his will can voice this event with a theatrical phrase like: "nine times" / "nine two", "Forty" (first nine) / "eighty" (second nine) (meaning the amount of the penalty for three shifted nines in a row equal to 120 points) and allows you to move again (in some companies, with two shifted nines in a row, it is customary to put a deck on the table, so that the shifter himself moved and removed a part of the deck and put it next to the remaining cards, only after that the dealer places the shifted part of the deck down the remaining cards); if a nine falls out three times in a row, the shifter is charged a penalty of 120 points. If the last card is a jack, then the dealer shows it to other players and puts the card in the middle of the deck ("marries a jack") and starts dealing (while the last card does not look anymore). In some companies it is customary to draw a jack (if and he ended up at the bottom) and click on the nose of the shifter, in some companies it is customary to “click on the nose” with a whole deck ... Such actions require a certain skill and knowledge of the player about the nuances of the rules of the game.
The cards are dealt one card clockwise and begins with the player sitting to the left of the dealer. During the deal, you must put three cards in the buy-in. In a three-player game, it is forbidden to put the last card in the buy-in. If during the distribution at least one card turned out to be revealed (whether by negligence or on purpose), or the last card was not in the draw (when playing with four players), then the dealer is charged a penalty of 120 points (the term "mess on the table") and the cards are transferred to the next player for distribution to the game. The same rule applies if the dealer did not let the “right hand” (sitting on the right) move the deck and started dealing cards. In some cases (by agreement) the cards do not go to the next player for the deal, the penalized player continues to deal cards.
In a three-player game, the dealer must deal cards one at a time clockwise so that the last card (which he was looking at) goes to him.
In a four-player game, the dealer deals a deck to himself for a buy-in (the term "sitting on a buy-in") in the amount of three cards and the dealer does not participate in the game. In a four-player game, the dealer is obliged to put the last card to himself, that is, to the buy-in, since he looked at it (the rule for shifting the deck, see above). In a four-player game, the dealer has no right to share his knowledge with other players in any way, otherwise he is penalized with a deduction of 120 points (or more by agreement) and the distribution goes to another player.
In a three or four player game, each player is dealt seven cards. The winner of the auction takes the buy-in of three cards, after which he is obliged to give two other players one of any cards of their choice, this is called “demolition of cards”. Thus, all players have an equal number of cards.
In a four-player game, the dealer ("sitting on the buy-in") does not take part in the game, and therefore automatically receives a predetermined number of points:
  • the dealer receives points equal to the sum of the points in the buy-in (taking into account rounding);
  • if the distribution in the community cards turned marriage, then its value is added to the total number of points in the community cards.
Bidding
After the cards have been dealt, the players evaluate their cards and announce the buy-in rates. A bet statement means the announcement of the number of points that the player undertakes to take in the current round (bet). The player who is next to the dealer starts the trade clockwise (to the left of the dealer). This player is called the "first hand" and must declare a minimum bet of 100 points. In various variations of the game, the “first hand” is obliged to declare a bet of exactly 100 points, with some - it has the right to declare any bet available to him. Then the players, in turn, in a clockwise direction, announce their bets, or refuse to bid (“pass”). It is impossible to violate the order of trading. If the player has passed, he is eliminated from the bidding and then the bidding continues without him with the remaining players.
Any bet entered must be a multiple of five (5). For example, 100, 115, 120. [?] In some varieties of the game in real life, the bidding takes place in increments of 5 points, that is, each player can only raise the rate by 5 points (100-105-110-115-120, etc.). Participating in this project in trading, the player has the right to declare any amount of points available to him for the application. The trade continues until there is one player to bet, which the rest of the players could not beat. This player is the winner of the auction.
During the bidding, there are rules that limit the number of points that a player can claim:
  • a player can not bet more than 120 points on the Marriage without hands;
  • a player can not bet more than 160 points, if the person possesses only the peak marriage;
  • a player can not bet more than 180 points, if the person possesses a marriage only of clubs;
  • a player can not bet more than 200 points, if the person possesses only diamonds marriage;
  • a player can not bet more than 220 points, if the person possesses a marriage of hearts only.
On this project, the program limits the maximum amount of the declared rate of 120 + suma all available on Mariage hands.
[?] When playing in reality, if a player declared a bet in violation of these rules, then the declared number of points is debited from his account, and the distribution goes to the next player in turn. In some cases (negotiated separately), other players are charged 60 points each.
Discarding cards
The player who won the auction takes the buy-in in the case of a three-player game - this is one buy-in consisting of three cards. In the case of a game for two, the player chooses one buy out of two possible ones of his choice. When the buy-in is taken, the buy-in cards are shown to all players, with the exception of the announcement of a game of 100 points, which the rest of the players "passed" ("sitting on a hundred") - then the buy-in is not revealed. On this project, whether the purchase is shown or not in the case of "sitting on a hundred" is determined by the parameters of the game when creating. In the case of a game for two, only the buy-in selected by the player is shown, which he takes, the second buy-in remains on the table with the backs facing up. The player who takes the buy-in gives (demolishes) one of any cards from his cards to each player. Cards are dealt face down. Thus, each player has nine (9) cards in his hand in the case of a three-player game and eleven (11) cards in his hand in a two-player game.
If there were only nines in the draw, or if any of the players have 4 nines or less than 14 points, the player can ask to re-deal the cards. On this project, the possibility of retaking is set in the game parameters.
Order
After discarding the cards, the player who won the bidding must make the final order (bet) to which he is going. The order (rate) cannot be lower than that indicated during the auction. It can only be equal or greater.
If the player sees that he cannot collect the declared bet, he can announce the list - “paint the game”. The rule "schedule the game" is set in the convention parameters when creating the game. In this case, the "penalty for painting" is also set in the parameters of the game. If the parameter is "YES", then after the game is painted, the player receives a penalty in the amount of the bet made during trading, his opponents receive 50% of the ordered game. If the parameter is "NO", then after the game is painted, the player receives one stick, his opponents receive 50% of the ordered game. You cannot paint the game on the "barrel".
Drawing
Each player, starting with the winning bidder, then clockwise, lays out one card on the table. The first player lays out any card from his hand of his choice. The first card played determines the call-in suit. All subsequent players must lay out any card of the same suit, if there are no cards with the same suit, then they must put a trump card, if there are no trump cards then any card of any suit. When everyone has put one card on the table, the player who has put the most senior trump card, or if there is no highest card of the leading suit on the table of trump cards, takes the cards laid out on the table and takes the bribe. See card seniority here. The player who took the bribe begins to make the next move. The game is played until the players run out of cards in their hands.
On this project, the program does not allow the player to lay out the wrong card. When playing in real life, if a player begins to cheat and put a card of the wrong suit in the presence of cards of the starting suit or in the presence of trump cards, then for such actions the player receives a penalty in the overall standings - minus 120 points. In this case, the bribes taken by him are not taken into account in the calculation of the result of the round.
There are special combinations in the game - a queen and a king of the same suit. Such combinations are called marijage or praise (praise). Praise can be “praised” in the course of the drawing. To do this, the player who won the bribe needs to enter from any margins card - from a queen or king and announce this to other players. On this project, when entering from the margin card, the margin is announced automatically. In this case, the suit of praise establishes a new trump card, and the player receives points for bribes in the round for announcing praise. The number of points received is determined by the suit of the marijage (praise). For more information on marriages, see here.
On the first move, it is forbidden to declare a margin, in this case, entering from a margin card will be considered a normal move, as if the player does not have any other margin cards.
Round (kon) results, scoring
At the end of the round, the points taken are counted - bribes plus the cost of the declared margins. Each player calculates the amount of cards he has collected. This is the sum of the denominations (value) of the collected cards. This total of points is rounded to a multiple of five (5) downwards for two (2) points and upwards for three (3) points. The rounding rule is valid only for ordinary players; rounding does not apply to the player who won the auction. If he has not reached at least one point to the ordered amount, then it is considered that he has not collected the ordered amount.
If the player who won the auction scored the declared amount of points, it is credited to his account, if not, it is debited from his account. All other players are awarded the points they have accumulated.

Rule "Stick" ("Bolt") If in the process of playing the knight the player did not take a single bribe, a "stick" ("bolt") is written to him. In this project, for three sticks during the game, 120 points are deducted from the player, the sticks are canceled, and if 3 sticks are received again in any distribution, the procedure is repeated.
[?] In life, there are options for which:
  • for three sticks in a row, 120 points are deducted from the player, while the previous "sticks" are canceled. Upon repeated receipt of 3 "sticks", the procedure is repeated;
  • the player is charged a penalty of 120 (or more, depending on the agreement) points for every fifth "stick" ("bolt") in the game.
Some nuances of playing the barrel:
If the total amount of player’s points exceeds 880, then the accrual of subsequent points to him stops, the player sits on the “barrel”.
  1. The player who is on the "barrel" receives a buy-in depending on the value of the convention parameter of the table "Trading on the barrel"
  2. A player on the barrel is required to score 121 points.
  3. The player on the barrel has three attempts to play 121 points. Moreover, with two unsuccessful attempts, penalty points are not awarded to him. If the third attempt is unsuccessful, then the player flies from the “barrel” and 120 points are removed from the player, one unplayed barrel is recorded in the player’s asset.
  4. If another player crawls onto the “barrel”, then the player sitting on the barrel is discarded from it, 120 points are removed from the player sitting on the barrel.
  5. If the keeper plays the game with a bet of 121, regardless of whether the player played the “keg” or not, the opponents do not take into account either points or sticks in this circle. They "stand still".
  6. If 2 or 3 players simultaneously hit the barrel, then they all roll off it, 120 points are removed from each player.
  7. If on the “barrel”, by another player, the stake of the keeper is overbought, the keeper will not receive points or sticks based on the results of the round.
  8. If a bet is raised on a “keg” kicking and a trade is won, then if he does not take the bet indicated during the trade, the keeper receives a fine in the amount of the bet and flies off the “keg”.
Table convention options:
- Retake: YES / NO
If the parameter is set to “YES”, then after the cards are demolished, the server checks for re-issuing. If there were only nine in the draw, or any of the players on hand has 4 nines or less than 14 points, the player may ask for a re-dealt card.

- Barrel Trading: YES / NO
If the parameter is “YES”, then trading is as usual, while playing the barrel, automatically declares the game to be 121 points, if “NO”, then the playing barrel declares the game at 121 and takes a buyback, trading to other players is not provided.

- Ace Marriage: YES / NO
If the parameter is "YES", then the game has an ace margin. Ace Margin is 4 aces, the cost of the margin is 200 points. This marriage is subject to the rules of ordinary marriages, i.e. such a marriage cannot be declared in the first move.

- Trade in the red: -100/-200/-300/-1000
If the player scored game points less than indicated in this parameter, the player automatically says a pass when trading.

- Show purchase: YES / NO
If the parameter is "YES", then the buyback is displayed to opponents, if it is "sitting on a hundred"

- Sign: YES / NO
If a player sees that he obviously cannot get the bet indicated during the trade, he can paint the game. See "Fine on the Paint". On the "barrel" you can not paint the game.

- Fine on painting: YES / NO
If the parameter is “YES”, then upon painting the game, the player receives a fine in the amount of bets made during the trade, his opponents receive 50% of the ordered game. If the parameter is set to “NO”, then upon painting the game, the player receives one stick, his opponents receive 50% of the ordered game.

- Tipper: YES / NO
If the parameter is “YES”, then when any player reaches 555 or -555 points after the next round, the points of this player become equal to 0.

- Golden Con: YES / NO
In case the parameter is “YES”, the points scored and not scored in the first three rounds in the game are multiplied by two.