refactored Board.board to Board.matrix