Triangle.js Docs
GitHub
Preparing search index...
src
Utils
adapters
Adapter
Class Adapter<T>
Abstract
Type Parameters
T
extends
CustomMessageData
=
CustomMessageData
Hierarchy (
View Summary
)
Adapter
IO
Index
Constructors
constructor
Methods
add
Pieces
config
config
From
Engine
initialize
play
play
From
Engine
state
From
Engine
stop
update
Constructors
constructor
new
Adapter
<
T
extends
CustomMessageData
=
CustomMessageData
>
()
:
Adapter
<
T
>
Type Parameters
T
extends
CustomMessageData
=
CustomMessageData
Returns
Adapter
<
T
>
Methods
Abstract
add
Pieces
addPieces
(
pieces
:
Engine
.
Mino
[]
,
data
?:
T
[
"pieces"
]
)
:
void
Parameters
pieces
:
Engine
.
Mino
[]
Optional
data
:
T
[
"pieces"
]
Returns
void
Abstract
config
config
(
engine
:
Engine
.
Engine
,
data
?:
T
[
"config"
]
)
:
void
Parameters
engine
:
Engine
.
Engine
Optional
data
:
T
[
"config"
]
Returns
void
Protected
config
From
Engine
configFromEngine
(
engine
:
Engine
.
Engine
,
)
:
Omit
<
Utils
.
adapters
.
Types
.
Outgoing
.
Config
<
T
>
,
"type"
|
"data"
>
Parameters
engine
:
Engine
.
Engine
Returns
Omit
<
Utils
.
adapters
.
Types
.
Outgoing
.
Config
<
T
>
,
"type"
|
"data"
>
Abstract
initialize
initialize
()
:
Promise
<
Info
<
T
>
>
Returns
Promise
<
Info
<
T
>
>
Abstract
play
play
(
engine
:
Engine
.
Engine
,
data
?:
T
[
"play"
]
)
:
Promise
<
Move
<
T
>
>
Parameters
engine
:
Engine
.
Engine
Optional
data
:
T
[
"play"
]
Returns
Promise
<
Move
<
T
>
>
Protected
play
From
Engine
playFromEngine
(
engine
:
Engine
.
Engine
)
:
Omit
<
Play
<
T
>
,
"type"
|
"data"
>
Parameters
engine
:
Engine
.
Engine
Returns
Omit
<
Play
<
T
>
,
"type"
|
"data"
>
Protected
state
From
Engine
stateFromEngine
(
engine
:
Engine
.
Engine
,
)
:
Omit
<
Utils
.
adapters
.
Types
.
Outgoing
.
State
<
T
>
,
"type"
|
"data"
>
Parameters
engine
:
Engine
.
Engine
Returns
Omit
<
Utils
.
adapters
.
Types
.
Outgoing
.
State
<
T
>
,
"type"
|
"data"
>
Abstract
stop
stop
()
:
void
Returns
void
Abstract
update
update
(
engine
:
Engine
.
Engine
,
data
?:
T
[
"state"
]
)
:
void
Parameters
engine
:
Engine
.
Engine
Optional
data
:
T
[
"state"
]
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
add
Pieces
config
config
From
Engine
initialize
play
play
From
Engine
state
From
Engine
stop
update
GitHub
Triangle.js Docs
Loading...