Documentation ¶
Index ¶
- type Position
- func (p Position) Down(i int) Position
- func (p Position) DownLeft(i int) Position
- func (p Position) DownRight(i int) Position
- func (p Position) GetXY() (int, int)
- func (p Position) GetXYFloat() (float64, float64)
- func (p Position) Left(i int) Position
- func (p Position) Opposite() Position
- func (p Position) Right(i int) Position
- func (p Position) Up(i int) Position
- func (p Position) UpLeft(i int) Position
- func (p Position) UpRight(i int) Position
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Position ¶
type Position int
const ( TOP_LEFT Position = 1 // 1 + 0 + 3(0) TOP_CENTER Position = 2 // 1 + 1 + 3(0) TOP_RIGHT Position = 3 // 1 + 2 + 3(0) MIDDLE_LEFT Position = 4 // 1 + 0 + 3(1) MIDDLE_CENTER Position = 5 // 1 + 1 + 3(1) MIDDLE_RIGHT Position = 6 // 1 + 2 + 3(1) BOTTOM_LEFT Position = 7 // 1 + 0 + 3(2) BOTTOM_CENTER Position = 8 // 1 + 1 + 3(2) BOTTOM_RIGHT Position = 9 // 1 + 2 + 3(2) INVALID Position = 0 )
Les nombres sont attribués selon la formule: 1 + x + 3y * [1][2][3] * [4][5][6] * [7][8][9]
noinspection GoUnusedConst,GoSnakeCaseUsage
func PositionAt ¶
func (Position) GetXYFloat ¶
Click to show internal directories.
Click to hide internal directories.