ColorTileMat
Hierarchy
↳ TileMat
↳ ColorTileMat
Index
Properties
- blueTiles
- centerX
- centerY
- greenTiles
- matrixColumns
- matrixMaxX
- matrixMaxY
- matrixMinX
- matrixMinY
- matrixRows
- maxX
- maxY
- minX
- minY
- redTiles
- tileColor
- tileColorMatrix
- whiteTiles
- yellowTiles
Methods
Properties
Static
blueTiles
▪ blueTiles: object[] = [ { row: 0, column: 1 }, { row: 1, column: 4 }, { row: 1, column: 6 }, { row: 3, column: 0 }, { row: 3, column: 6 }, { row: 5, column: 2 }, { row: 5, column: 4 }, { row: 6, column: 7 }, { row: 7, column: 0 }, { row: 7, column: 4 }, ]
Defined in id/position/colorTileMat.ts:153
Static
Readonly
centerX
▪ centerX: 750 = 750
Defined in id/position/colorTileMat.ts:8
Static
Readonly
centerY
▪ centerY: 250 = 250
Defined in id/position/colorTileMat.ts:9
Static
greenTiles
▪ greenTiles: object[] = [ { row: 1, column: 0 }, { row: 2, column: 5 }, { row: 2, column: 7 }, { row: 3, column: 2 }, { row: 4, column: 5 }, { row: 4, column: 7 }, { row: 6, column: 1 }, { row: 6, column: 5 }, { row: 8, column: 3 }, { row: 8, column: 7 }, ]
Defined in id/position/colorTileMat.ts:166
Static
Readonly
matrixColumns
▪ matrixColumns: 9 = 9
Overrides TileMat.matrixColumns
Defined in id/position/colorTileMat.ts:16
Static
Readonly
matrixMaxX
▪ matrixMaxX: 947 = 947
Overrides TileMat.matrixMaxX
Defined in id/position/colorTileMat.ts:13
Static
Readonly
matrixMaxY
▪ matrixMaxY: 446 = 446
Overrides TileMat.matrixMaxY
Defined in id/position/colorTileMat.ts:14
Static
Readonly
matrixMinX
▪ matrixMinX: 555 = 555
Overrides TileMat.matrixMinX
Defined in id/position/colorTileMat.ts:11
Static
Readonly
matrixMinY
▪ matrixMinY: 53 = 53
Overrides TileMat.matrixMinY
Defined in id/position/colorTileMat.ts:12
Static
Readonly
matrixRows
▪ matrixRows: 9 = 9
Overrides TileMat.matrixRows
Defined in id/position/colorTileMat.ts:15
Static
Readonly
maxX
▪ maxX: 955 = 955
Defined in id/position/colorTileMat.ts:6
Static
Readonly
maxY
▪ maxY: 455 = 455
Defined in id/position/colorTileMat.ts:7
Static
Readonly
minX
▪ minX: 545 = 545
Defined in id/position/colorTileMat.ts:4
Static
Readonly
minY
▪ minY: 45 = 45
Defined in id/position/colorTileMat.ts:5
Static
redTiles
▪ redTiles: object[] = [ { row: 0, column: 5 }, { row: 0, column: 7 }, { row: 1, column: 2 }, { row: 3, column: 4 }, { row: 3, column: 8 }, { row: 4, column: 1 }, { row: 5, column: 8 }, { row: 6, column: 3 }, { row: 7, column: 6 }, { row: 8, column: 1 }, ]
Defined in id/position/colorTileMat.ts:140
Static
Readonly
tileColor
▪ tileColor: object = { white: '#FFFFFF', red: '#e85654', blue: '#00aeca', green: '#95ba25', yellow: '#f0ac00', } as const
Defined in id/position/colorTileMat.ts:21
toio Collection tile color names.
Type declaration:
blue: "#00aeca" = "#00aeca"
green: "#95ba25" = "#95ba25"
red: "#e85654" = "#e85654"
white: "#FFFFFF" = "#FFFFFF"
yellow: "#f0ac00" = "#f0ac00"
Static
tileColorMatrix
▪ tileColorMatrix: "#FFFFFF" | "#e85654" | "#00aeca" | "#95ba25" | "#f0ac00"[][] = [ [ ColorTileMat.cW, ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cY, ColorTileMat.cW, ColorTileMat.cR, ColorTileMat.cW, ColorTileMat.cR, ColorTileMat.cW, ], [ ColorTileMat.cG, ColorTileMat.cW, ColorTileMat.cR, ColorTileMat.cW, ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cY, ], [ ColorTileMat.cW, ColorTileMat.cY, ColorTileMat.cW, ColorTileMat.cY, ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ], [ ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ColorTileMat.cR, ColorTileMat.cW, ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cR, ], [ ColorTileMat.cW, ColorTileMat.cR, ColorTileMat.cW, ColorTileMat.cY, ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ], [ ColorTileMat.cY, ColorTileMat.cW, ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cY, ColorTileMat.cW, ColorTileMat.cR, ], [ ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ColorTileMat.cR, ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ColorTileMat.cB, ColorTileMat.cW, ], [ ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cY, ColorTileMat.cW, ColorTileMat.cB, ColorTileMat.cW, ColorTileMat.cR, ColorTileMat.cW, ColorTileMat.cY, ], [ ColorTileMat.cW, ColorTileMat.cR, ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ColorTileMat.cY, ColorTileMat.cW, ColorTileMat.cG, ColorTileMat.cW, ], ]
Defined in id/position/colorTileMat.ts:38
toio Collection tile color matrix.
Static
whiteTiles
▪ whiteTiles: object[] = [ { row: 0, column: 0 }, { row: 0, column: 2 }, { row: 0, column: 4 }, { row: 0, column: 6 }, { row: 0, column: 8 }, { row: 1, column: 1 }, { row: 1, column: 3 }, { row: 1, column: 5 }, { row: 1, column: 7 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 2, column: 4 }, { row: 2, column: 6 }, { row: 2, column: 8 }, { row: 3, column: 1 }, { row: 3, column: 3 }, { row: 3, column: 5 }, { row: 3, column: 7 }, { row: 4, column: 0 }, { row: 4, column: 2 }, { row: 4, column: 4 }, { row: 4, column: 6 }, { row: 4, column: 8 }, { row: 5, column: 1 }, { row: 5, column: 3 }, { row: 5, column: 5 }, { row: 5, column: 7 }, { row: 6, column: 0 }, { row: 6, column: 2 }, { row: 6, column: 4 }, { row: 6, column: 6 }, { row: 6, column: 8 }, { row: 7, column: 1 }, { row: 7, column: 3 }, { row: 7, column: 5 }, { row: 7, column: 7 }, { row: 8, column: 0 }, { row: 8, column: 2 }, { row: 8, column: 4 }, { row: 8, column: 6 }, { row: 8, column: 8 }, ]
Defined in id/position/colorTileMat.ts:192
Static
yellowTiles
▪ yellowTiles: object[] = [ { row: 0, column: 3 }, { row: 1, column: 8 }, { row: 2, column: 1 }, { row: 2, column: 3 }, { row: 4, column: 3 }, { row: 5, column: 0 }, { row: 5, column: 6 }, { row: 7, column: 2 }, { row: 7, column: 8 }, { row: 8, column: 5 }, ]
Defined in id/position/colorTileMat.ts:179
Methods
Static
getTileCenter
▸ getTileCenter(row
: number | undefined, column
: number | undefined): object | undefined
Inherited from TileMat.getTileCenter
Defined in id/position/tileMat.ts:18
Get center of the tile position.
Parameters:
Name | Type | Description |
---|---|---|
row | number | undefined | Target row number. |
column | number | undefined | Target column number. |
Returns: object | undefined
Center position x, y of the specified row/column as {x: number, y: number}
. If specified row/column is invalid, this function returns undefined.
Static
getTileColor
▸ getTileColor(x
: number | undefined, y
: number | undefined): string | undefined
Defined in id/position/colorTileMat.ts:244
Get tile color of toio Collection.
Parameters:
Name | Type | Description |
---|---|---|
x | number | undefined | X coordinate of checking target point. |
y | number | undefined | Y coordinate of checking target point. |
Returns: string | undefined
tile color name string. If specified (x, y) is not on toio Collection tile mat, this function returns undefined.
Static
getTileColumn
▸ getTileColumn(x
: number | undefined): number | undefined
Inherited from TileMat.getTileColumn
Defined in id/position/tileMat.ts:101
Get column index number of the tile matrix.
Parameters:
Name | Type | Description |
---|---|---|
x | number | undefined | X coordinate of checking target point. |
Returns: number | undefined
Column index number.
Static
getTileMatrixIndex
▸ getTileMatrixIndex(x
: number | undefined, y
: number | undefined): object | undefined
Inherited from TileMat.getTileMatrixIndex
Defined in id/position/tileMat.ts:49
Get matrix index of simple play(tile) mat.
Parameters:
Name | Type | Description |
---|---|---|
x | number | undefined | X coordinate of checking target point. |
y | number | undefined | Y coordinate of checking target point. |
Returns: object | undefined
row/column numbers as {row: number, column: number}
. If specified (x, y) is not on toio Collection tile mat, this function returns undefined.
Static
getTileRow
▸ getTileRow(y
: number | undefined): number | undefined
Inherited from TileMat.getTileRow
Defined in id/position/tileMat.ts:74
Get row index number of the tile matrix.
Parameters:
Name | Type | Description |
---|---|---|
y | number | undefined | Y coordinate of checking target point. |
Returns: number | undefined
Row index number.
Static
isOnMat
▸ isOnMat(x
: number | undefined, y
: number | undefined): boolean
Defined in id/position/mat.ts:17
Specified coordinate is on the mat or not.
Parameters:
Name | Type | Description |
---|---|---|
x | number | undefined | X coordinate of checking target point. |
y | number | undefined | Y coordinate of checking target point. |
Returns: boolean
true iff specified (x, y) is on this mat.