This is an important design decision. Classes working together should be loosely coupled. We created an interface named ChessDelegate providing a service of pieceAt(col: Int, row: Int), which returns a nullable object of ChessPiece. In an interface, functions have only signature without body.
interface ChessDelegate {
fun pieceAt(col: Int, row: Int) : ChessPiece?
}
GitHub repo:
https://github.com/zhijunsheng/chess-...