Initial commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package board
|
||||
|
||||
type Position struct {
|
||||
row int
|
||||
column int
|
||||
blockRow int
|
||||
blockColumn int
|
||||
inBlockRow int
|
||||
inBlockColumn int
|
||||
}
|
||||
|
||||
func (p *Position) GetRow() int {
|
||||
return p.row
|
||||
}
|
||||
|
||||
func (p *Position) GetColumn() int {
|
||||
return p.column
|
||||
}
|
||||
|
||||
func (p *Position) GetBlockRow() int {
|
||||
return p.blockRow
|
||||
}
|
||||
|
||||
func (p *Position) GetBlockColumn() int {
|
||||
return p.blockColumn
|
||||
}
|
||||
|
||||
func (p *Position) GetInBlockRow() int {
|
||||
return p.inBlockRow
|
||||
}
|
||||
|
||||
func (p *Position) GetInBlockColumn() int {
|
||||
return p.inBlockColumn
|
||||
}
|
||||
|
||||
func (p *Position) GetCoords() (int, int) {
|
||||
return p.row, p.column
|
||||
}
|
||||
|
||||
func (p *Position) GetBlockCoords() (int, int) {
|
||||
return p.blockRow, p.blockColumn
|
||||
}
|
||||
|
||||
func (p *Position) GetInBlockCoords() (int, int) {
|
||||
return p.inBlockRow, p.inBlockColumn
|
||||
}
|
||||
Reference in New Issue
Block a user