[][src]Crate cetkaik_full_state_transition

Modules

message

Describes the inputs from the players. /プレイヤーからの入力を表現する。

probabilistic

Describes the probability distribution of states. Exactly which state is reached depends on the server-side result of casting sticks. /状態の確率分布を表現する。サーバー側で投げ棒を乱択することで、どの状態に至るかが決まる。

state

Describes the state that the game is in. /ゲームの状態を表現する型。状態遷移図は複雑なので、詳しくはプレゼン https://docs.google.com/presentation/d/1IL8lelkw3oZif3QUQaKzGCPCLiBguM2kXjgOx9Cgetw/edit#slide=id.g788f78d7d6_0_0 または画像 https://pbs.twimg.com/media/EqCkMhXUcAIynsd?format=png&name=900x900 を参照すること。

Structs

Config

Describes the minor differences between the numerous rule variants. /細かなルール差を吸収するための型。

Scores

Describes the scores that the two players have. Players each begin with 20 points, and loses when all the points are lost. /両プレイヤーが持つ得点を表す型。双方20点スタートであり、点が0点になると敗北。

Victor

Describes who won the game. If Victor(None), the game is a tie. /どちらが勝利したのかを表現する型。 Victor(None) であれば引き分け。

Enums

Consequence

Describes whether an action is forbidden, penalized, or allowed without any penalty. 行為が禁止されるか、罰則付きであるか、それとも許容されるかを表現する型。

IfTaxot

An auxiliary type that represents whether we should terminate the game or proceed to the next season if the player chose to end the current season. /もし終季が選ばれた際、次の季節に進むのか、それともゲームが終了するのかを保持するための補助的な型。

Rate

Theoretically speaking, it is necessary to distinguish x32 and x64 because it is possible to score 1 point (3+3-5). Not that it will ever be of use in any real situation. /3点役2つと-5点役一つを同時成立させることにより1点の得点を得ることが可能である。したがって、二人の得点の総和が40点である以上、32倍レートと64倍レートを区別する必要がある(32点を獲得することは必ずしも勝利を意味しないが、64点を獲得することは必ず勝利を意味するので)。

Season

Represents the season. Currently, only four-season games are supported. /季節を表現する。今のところ4季制のことしか考えていない。

Functions

apply_after_half_acceptance

AfterHalfAcceptance sends C to Probabilistic<HandNotResolved>

apply_inf_after_step
apply_normal_move

NormalMove sends A to Probabilistic<HandNotResolved>

initial_state

Start of the game, with the season in spring and each player holding 20 points /ゲーム開始、季節は春で所持点は20

no_move_possible_at_all

When completely stuck, call this function to end the game. /完全に手詰まりのときは、この関数を呼び出すことで即時決着がつく。

resolve

Sends HandNotResolved to HandResolved.