controller

package
v0.0.0-...-4e0c666 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryConf

type EntryConf struct {
	Nngs             Nngs
	MatchApplication MatchApplication
}

EntryConf - 参加設定。

func (EntryConf) Apply

func (config EntryConf) Apply() bool

Apply - 自分の方から申し込むなら true, 申し込みを受けるのを待つ方なら false。 true にしたなら、 Opponent も設定してください

func (EntryConf) AvailableTimeMinutes

func (config EntryConf) AvailableTimeMinutes() uint

AvailableTimeMinutes - 持ち時間(分)

func (EntryConf) BoardSize

func (config EntryConf) BoardSize() uint

BoardSize - 何路盤

func (EntryConf) CanadianTiming

func (config EntryConf) CanadianTiming() uint

CanadianTiming - カナダ式秒読み。25手を何分以内に打てばよいか

func (EntryConf) EngineCommand

func (config EntryConf) EngineCommand() string

EngineCommand - 思考エンジンを起動するコマンドの実行ファイル名の部分(OSにより書き方が異なるかも)

func (EntryConf) EngineCommandOption

func (config EntryConf) EngineCommandOption() string

EngineCommandOption - 思考エンジンを起動するコマンドの半角スペース区切りの引数(OSにより書き方が異なるかも)

func (EntryConf) Host

func (config EntryConf) Host() string

Host - 接続先ホスト名

func (EntryConf) Opponent

func (config EntryConf) Opponent() string

Opponent - 自分の方から申し込むなら、対戦相手のアカウント名も指定してください。そうでないなら無視されます

func (EntryConf) Pass

func (config EntryConf) Pass() string

Pass - 何路盤

func (EntryConf) Phase

func (config EntryConf) Phase() string

Phase - 何路盤

func (EntryConf) PlayerType

func (config EntryConf) PlayerType() string

PlayerType - プレイヤーの種類 * `Human` - 人間プレイヤーが接続する * `GTP` - GTP(碁テキスト プロトコル)を用いる思考エンジンが接続する

func (EntryConf) Port

func (config EntryConf) Port() uint

Port - 接続先ホストのポート番号

func (EntryConf) User

func (config EntryConf) User() string

User - 対局者名(アカウント名) Only A-Z a-z 0-9 Names may be at most 10 characters long

type MatchApplication

type MatchApplication struct {
	Apply                bool
	Opponent             string
	Phase                string
	BoardSize            int64
	AvailableTimeMinutes int64
	CanadianTiming       int64
}

MatchApplication - MatchApplication 区画。

type Nngs

type Nngs struct {
	PlayerType          string
	Host                string
	Port                int64 // Tomlのライブラリーが精度を細かく指定できないので int64 型で。
	User                string
	Pass                string
	EngineCommand       string
	EngineCommandOption string
}

Nngs - Nngs 区画。

type NngsGtpController

type NngsGtpController struct {
	e.NngsListener

	// EngineIO - GTPプロトコル対応のコンピューター囲碁ソフト(外部プロセス)との入出力に利用
	EngineIO exec.Cmd

	// EntryConf - 参加設定
	EntryConf EntryConf
}

NngsGtpController - NNGS からの受信メッセージをさばきます。

func (NngsGtpController) NoticeMyPhase

func (con NngsGtpController) NoticeMyPhase()

NoticeMyPhase - 自分の手番であることのアナウンスが来ました。 この通知を受け取ったら、思考を開始してください。 指し手の入力をするには、別途、非同期の出力で 返してください Original code: nngsCUI.rb/announce class/update/`when 'my_turn'`

func (NngsGtpController) NoticeOpponentPhase

func (con NngsGtpController) NoticeOpponentPhase()

NoticeOpponentPhase - 相手の手番であることのアナウンス Original code: nngsCUI.rb/announce class/update/`when 'his_turn'`

type NngsHumanController

type NngsHumanController struct {
	e.NngsListener

	// EntryConf - 参加設定
	EntryConf EntryConf
}

NngsHumanController - NNGS からの受信メッセージをさばきます。

func (NngsHumanController) NoticeMyPhase

func (con NngsHumanController) NoticeMyPhase()

NoticeMyPhase - 自分の手番であることのアナウンスが来ました。 この通知を受け取ったら、思考を開始してください。 指し手の入力をするには、別途、非同期の出力で 返してください Original code: nngsCUI.rb/announce class/update/`when 'my_turn'`

func (NngsHumanController) NoticeOpponentPhase

func (con NngsHumanController) NoticeOpponentPhase()

NoticeOpponentPhase - 相手の手番であることのアナウンス Original code: nngsCUI.rb/announce class/update/`when 'his_turn'`

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL